nvme_identify_uuid(2)

✨ nvme_identify_uuid ✨

okay bestie, so this one lives in the libnvme API manual (it's a section 2 page, iykyk πŸ’…), and it's literally just "give me the UUIDs on this device, please." let's get into it πŸ¦‹


🌸 NAME 🌸

nvme_identify_uuid β€” retrieves the device's UUIDs πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

int nvme_identify_uuid (int fd , struct nvme_id_uuid_list *uuid_list );

πŸ’– ARGUMENTS πŸ’–

  • fd β€” the file descriptor of the nvme device. like, this is which device we're talking to, bestie.
  • uuid_list β€” the user space destination address where the data gets transferred 🫢 that's where the goodies land.

πŸ¦‹ DESCRIPTION πŸ¦‹

so each UUID List entry is one of two things: either 0h, which is the NVMe Invalid UUID, or a valid UUID. that's the whole vibe check right there.

and what counts as valid?? okay so valid UUIDs are the ones that are non-zero and are not the NVMe Invalid UUID. no zeroes, no invalids, periodt. ✨

if you wanna know the definition of the returned structure, go peek at struct nvme_id_uuid_list β€” that's where it's all defined, no cap.


⭐ RETURN ⭐

so when it comes back, you get the nvme command status if a response was received (check enum nvme_status_field for that, bestie πŸ‘€). and if not?? you get -1 with errno set instead. that's the whole deal.

🚨 heads up: -1 means something went sideways and errno is holding the receipts. don't ignore it, fr fr.

🌈 SEE ALSO 🌈

  • struct nvme_id_uuid_list
  • enum nvme_status_field

(these are the ones this page actually points you at β€” go read 'em, they ate πŸ’…)


and that's the whole page!! this was the libnvme API manual, section nvme_identify_uuid(2), dated July 2026. thanks for coming to my ted talk, mwah πŸ’–πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from