NVME_GET_LOG_ROTATIONAL_MEDIA_INFO(2)

πŸ’– nvme_get_log_rotational_media_info β€” the "where my spinning disks at" log πŸ’–

okay bestie, so this is a page from the libnvme API manual, and today's main character is nvme_get_log_rotational_media_info. No cap, the name is a whole mouthful, but the vibe is simple: it goes and gets you the Rotational Media Information Log off your NVMe device. πŸŒ€βœ¨


✨ NAME ✨

nvme_get_log_rotational_media_info β€” Retrieve Rotational Media Information Log

Like... it literally does what it says. It retrieves the Rotational Media Information Log. Iconic behaviour honestly. 🫢


✨ SYNOPSIS ✨

int nvme_get_log_rotational_media_info (int fd , __u16 endgid , __u32 len , struct nvme_rotational_media_info_log *log );

✨ ARGUMENTS ✨

  • fd β€” the file descriptor of the nvme device. this is your VIP pass into the device, your backstage wristband, your "i belong here" energy. πŸŽ€
  • endgid β€” Endurance Group Identifier. it's a __u16, it picks which endurance group you're asking about. lowkey specific, highkey important. πŸ’…
  • len β€” the allocated length of the log page. you gotta tell it how much room you made. it's a __u32, so it's got range. 🌈
  • log β€” user address to store the log page. it's a struct nvme_rotational_media_info_log *, and this is where the tea gets poured. πŸ“

✨ RETURN ✨

So here's the deal: you get the nvme command status if a response was received β€” go peek at enum nvme_status_field for the full lore β€” or you get -1 with errno set otherwise. that's it, that's the whole energy. no response from the device = -1 + errno, and you go read errno like it's a group chat you missed. 😭

ngl, if you see a -1, do not just vibe past it. check errno. fr fr, always check errno.

and that's the page bestie!! πŸ’œ this lil writeup lives in the libnvme API manual, and it's dated July 2026 β€” so yeah, freshly stamped, main character energy, off you go. go get that log. slay. πŸ‘‘πŸ’–


nvme_get_log_rotational_media_info β€” libnvme API manual β€” July 2026 πŸ¦‹

πŸ“¦ where this page comes from