nvme_mi_adm...primary_ctrl(2)

✨ NAME ✨

nvme_mi_admin_identify_primary_ctrl β€” bestie, this one does an Admin identify to pull the primary controller capabilities data structure. it's giving "tell me everything about this controller" energy πŸ‘‘


🌸 SYNOPSIS 🌸

int nvme_mi_admin_identify_primary_ctrl (nvme_mi_ctrl_t ctrl , __u16 cntid , struct nvme_primary_ctrl_cap *cap );

πŸŽ€ ARGUMENTS πŸŽ€

  • ctrl β€” the Controller you're sending this identify command off to πŸ’Œ
  • cntid β€” the Controller ID you wanna specify, like "hey, this one" 🫡
  • cap β€” the Primary Controller Capabilities data structure that's gonna get populated. it starts empty and leaves full, glow-up arc fr fr ✨

πŸ’… DESCRIPTION πŸ’…

okay so basically you run an Identify command and it hands you back the Primary Controller Capabilities data for whichever controller cntid points at. no cap, that's literally the whole vibe 🌈

but here's the tea β˜• β€” if the response data coming back from the controller is not a full NVME_IDENTIFY_DATA_SIZE, this thing throws an error at you. so on success you can trust that cap is fully populated, like every single field, no half-eaten data structure left behind 😭

lowkey important: partial data = error, not a silent partial fill. so if you get a 0 back, cap is complete and you can go off πŸ’―

See: struct nvme_primary_ctrl_cap πŸ‘€


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸ₯³
  • non-zero on failure πŸ’€

and that's the whole page, bestie β€” signed off fresh from the libnvme API manual, dated July 2026. periodt. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from