libnvme_scan_ctrl(9)
π libnvme_scan_ctrl
okay so bestie, welcome to the libnvme API manual β yes that's the manual name, and yes we're reading a manpage together, this is our bonding time now π«Ά
This one's about scanning a controller. Short page, but honestly iconic of it.
πΈ NAME
libnvme_scan_ctrl β scan on a controller β¨
(like, literally, it's the "go find me that controller" function. that's the whole vibe.)
π SYNOPSIS
int libnvme_scan_ctrl (struct libnvme_global_ctx *ctx , const char *name
, struct libnvme_ctrl **c );
no cap, that's the exact signature, weird spacing and all. we do not touch it. π
π¦ ARGUMENTS
ctxβ yourstruct libnvme_global_ctxobject. the main character of the whole libnvme situation, honestly. you're handing it over so it can do the scanning.nameβ the name of the controller. like, the name name. this is how we tell it which one we're looking for πcβ astruct libnvme_ctrlobject to return. it's a double pointer (**), so it's giving "i'll fill in your pointer for you" energy π
π DESCRIPTION
Scans a controller with the sysfs name name and adds it to r.
and yes, the page really does say r β we're just the messengers, bestie π«Ά that's the exact wording, so that's what you get. ngl, r wasn't introduced in the arguments, but we don't start drama with the documentation around here π
the tea is: you give it the global context, you give it the sysfs name, and it goes and scans that controller. simple. clean. slay.
π₯ RETURN
0on success π (we love a zero)- a negative error code otherwise π (if you see a negative number, that's your sign, time to check the error)
so yeah, that's libnvme_scan_ctrl β short page, big "i do exactly one thing and i do it correctly" energy. periodt π
this page is from the libnvme API manual, dated October 2026, and its source/version tag is literally just libnvme_scan_ctrl β we're closing out with that iconic little header again, love that for us ππ bye bestie, go scan some controllers πβ¨
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms