libnvme_mi_ctrl_id(9)

πŸ“¦ version 3.2, in arch rolling

πŸ’… libnvme_mi_ctrl_id

okay so bestie, this one lives in the libnvme API manual (yes, that's the whole manual name, we're fancy here) and it's genuinely one of the cutest little getters you'll ever meet β€” it just hands you a controller's ID and minds its own business. πŸŽ€

✨ NAME ✨

libnvme_mi_ctrl_id β€” get the ID of a controller 🫢

🌸 SYNOPSIS 🌸

__u16 libnvme_mi_ctrl_id (struct libnvme_transport_handle *hdl );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • hdl β€” the transport handle to the controller you wanna query. that's it. that's the whole vibe check. ✨

πŸ’– DESCRIPTION πŸ’–

So like, this function retrieves the ID of the controller β€” and no, it's not making one up, the ID is as defined by hardware 😌, and it's available in the Identify (Controller List) data. literally it's just sitting there waiting for you.

Here's the tea though: this is the value that was passed to libnvme_mi_init_transport_handle, but β€” and this is the important part, don't skip it β€” that handle may have been created internally via libnvme_mi_scan_ep. so the handle you're holding might have been born in a scan, not in your own two hands. iykyk πŸ’…

πŸ‘‘ RETURN πŸ‘‘

the (locally-stored) ID of this controller. that's it. it returns a __u16, it's stored locally, and it's yours. slay. ⭐


and that's the whole page, bestie β€” no cap, she's short and she's iconic 🧚

source/version: libnvme API manual Β· page: libnvme_mi_ctrl_id(9) Β· dated October 2026 πŸ’œ mwah, see you in the next manpage πŸ’‹

πŸ“¦ where this page comes from