libnvme_scan_ctrl(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… 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 β€” your struct libnvme_global_ctx object. 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 β€” a struct libnvme_ctrl object 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

  • 0 on 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