libnvme_mi_ctrl_id(9)
π 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
- 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