libnvme(2)

πŸ’– libnvme(2) β€” API Manual πŸŽ€

okay bestie, come sit with me because we're doing the libnvme manual, section 2 β€” that's the API Manual, the devs-only zone, and today's main character is one very specific lil struct. no cap, it's giving "I hold the receipts on your controller resets" energy. let's go πŸ¦‹


✨ NAME ✨

struct nvme_power_on_reset_info_list β€” literally the Controller Reset Information struct. that's it, that's the whole job. she tracks what went down when your controller powered on / reset. πŸ’…


🌸 SYNOPSIS 🌸

struct nvme_power_on_reset_info_list {
    __le16 cid;
    __u8 fw_act;
    __u8 op_in_prog;
    __u8 rsvd4[12];
    __le32 ctrl_power_cycle;
    __le64 power_on_ml_seconds;
    __le64 ctrl_time_stamp;
 };

copy that verbatim, don't you dare "clean it up" bestie, every underscore and every __le prefix is load-bearing πŸ’€


πŸ‘‘ Members πŸ‘‘

  • cid β€” the Controller ID. which controller are we even talking about, bestie? this is how you find out. 🫢
  • fw_act β€” Firmware Activation. the firmware activation situation. real "did the glow-up actually install" energy ✨
  • op_in_prog β€” Operation in Progress. something's still mid-process, she's not done yet, do not interrupt πŸ™ˆ
  • rsvd4 β€” Reserved. it's reserved, so hands off, that's not your lane, we don't touch it periodt πŸ’…
  • ctrl_power_cycle β€” Controller Power Cycle. the power cycle count for the controller, she's keeping track πŸ”₯
  • power_on_ml_seconds β€” Power on milliseconds. power-on time, measured in milliseconds β€” yes, milli, tiny little units, we love precision πŸŽ€
  • ctrl_time_stamp β€” Controller Timestamp. the controller's timestamp, so you know exactly when this whole vibe happened ⭐

lowkey important: these fields are laid out exactly as written in the synopsis, with their exact types β€” __le16, __u8, __u8, __u8[12], __le32, __le64, __le64 β€” in that order. the byte-for-byte layout is the whole point, so no remixing. 🧚

and that's the whole page, bestie, you ate it πŸ’– this struct came straight out of libnvme (the one and only), stamped July 2026, and it's all about that struct nvme_power_on_reset_info_list. mwah, go forth and read your reset info πŸŒˆπŸ’œ

πŸ“¦ where this page comes from