nvme_scan_ctrl_namespaces(2)

✨ nvme_scan_ctrl_namespaces ✨

okay bestie, gather round, because we're reading a <pink>libnvme API manual</pink> page and it's literally the cutest little syscall wrapper you've ever seen. say hi to nvme_scan_ctrl_namespaces(2) πŸ’–


🌸 NAME 🌸

nvme_scan_ctrl_namespaces β€” go on a lil scavenger hunt for namespaces inside a controller πŸ•΅οΈβ™€οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

int nvme_scan_ctrl_namespaces (nvme_ctrl_t c , struct dirent ***ns );

yep that's the whole thing. two args, one int coming back at you. no cap. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the controller you wanna scan, girl. this is the one we're snooping through πŸ‘‘
  • ns β€” a pointer to an array of dirents. that's where all the found namespace entries are gonna land πŸ“

⭐ RETURN ⭐

it returns the number of entries in ns β€” like, how many namespaces it found. that's the whole vibe check result right there πŸ’œ


not me being obsessed with a function that just... counts things. iconic behavior honestly 🫢

and that's a wrap, bestie!! this page came out of the <purple>libnvme API manual</purple> and it's dated <cyan>July 2026</cyan>, so if you're reading this in the future, hey, hope the namespaces are plentiful 🌈✨ byeeee πŸ’–πŸ§š

πŸ“¦ where this page comes from