NVME_MI_ADMIN_IDENTIFY_CTRL_LIST(2)

πŸ’– nvme_mi_admin_identify_ctrl_list πŸ’–

okay bestie, so this one lives in the libnvme API manual, and it's genuinely so useful β€” it's how you get a list of controllers straight from the controller itself. no cap. let's go ✨


✨ NAME ✨

nvme_mi_admin_identify_ctrl_list β€” Perform an Admin identify for a controller list.

it does exactly what it says on the tin, fr fr πŸŽ€


🌸 SYNOPSIS 🌸

int nvme_mi_admin_identify_ctrl_list (nvme_mi_ctrl_t ctrl , __u16 cntid
, struct nvme_ctrl_list *list );

three things go in, one int comes out. iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctrl β€” Controller to process identify command. this is the whole main character of the call, the controller you're asking 🫢
  • cntid β€” Controller ID to specify list start. it's a __u16, and it tells the list where to begin ✨
  • list β€” List data to populate. a pointer to struct nvme_ctrl_list, and yes, you're filling this bad boy up πŸ’–

πŸ“ DESCRIPTION πŸ“

so here's the vibe: this performs an Identify command, for the controller list starting with IDs greater than or equal to cntid. literally just "gimme everyone from here on out" 🧚

and here's the important part, so listen up: it will return an error if the length of the response data (from the controller) is not a full NVME_IDENTIFY_DATA_SIZE. so basically, either the whole thing lands or it yells at you β€” and on success, id will be fully populated. no half-filled vibes allowed πŸ™ˆ

See: struct nvme_ctrl_list πŸ‘‘


πŸ’œ RETURN πŸ’œ

  • the nvme command status if a response was received (peep enum nvme_status_field for the deets) πŸ”₯
  • or -1 with errno set otherwise 😭
bestie note: that -1 means it never even got a response, so don't go looking at the status field β€” check your errno instead πŸ’€

🌈 SEE ALSO 🌈

struct nvme_ctrl_list, enum nvme_status_field β€” go read those, iykyk πŸ’–


and that's the whole thing! this page is from the libnvme API manual, dated July 2026. slay, go populate some lists, mwah πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from