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 astruct 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. checkerrno. fr fr, always checkerrno.
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
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms