libnvme(2)

πŸ’– libnvme β€” the manual, but make it a vibe πŸ’–

okay bestie, so this is a page from the libnvme(2) manual β€” yeah, section 2, the API Manual one, we're in the C-API part of the library πŸ’…. Sit down, hydrate, and let's talk about one very specific little enum, because that's the whole page. No cap.


✨ NAME ✨

enum nvme_eom_optional_data_present β€” the EOM Optional Data Present Fields. that's it, that's the whole thing, and honestly? iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

here's the enum, verbatim, character for character, don't touch it, it's perfect:

enum nvme_eom_optional_data_present {
    NVME_EOM_ODP_PEFP_SHIFT ,
    NVME_EOM_ODP_EDFP_SHIFT ,
    NVME_EOM_ODP_RSVD_SHIFT ,
    NVME_EOM_ODP_PEFP_MASK ,
    NVME_EOM_ODP_EDFP_MASK ,
    NVME_EOM_ODP_RSVD_MASK

};

look at her. six members. shifts on top, masks on the bottom. it's giving organized. πŸŽ€


πŸ¦‹ Constants πŸ¦‹

each of these does literally one job and does it well, and we love that for them:

  • NVME_EOM_ODP_PEFP_SHIFT β€” the shift amount you use to pull the printable eye field present out of the struct nvme_phy_rx_eom_log.odp field. slide it over, bestie ✨
  • NVME_EOM_ODP_EDFP_SHIFT β€” the shift amount for getting the eye data field present out of that same struct nvme_phy_rx_eom_log.odp field.
  • NVME_EOM_ODP_RSVD_SHIFT β€” shift amount to grab the reserved optional data present from struct nvme_phy_rx_eom_log.odp. yeah that field again. she's the main character fr fr πŸ’…
  • NVME_EOM_ODP_PEFP_MASK β€” the mask that gets you the printable eye field present from struct nvme_phy_rx_eom_log.odp. masking era 😌
  • NVME_EOM_ODP_EDFP_MASK β€” mask for getting the eye data field present from struct nvme_phy_rx_eom_log.odp.
  • NVME_EOM_ODP_RSVD_MASK β€” mask to get the reserved data present from struct nvme_phy_rx_eom_log.odp.
lowkey the whole page is about one .odp field inside struct nvme_phy_rx_eom_log and how to slice it up. shift then mask. that's the recipe. don't skip steps. πŸ’€

and that's the page, babes 🫢 that's literally all of it β€” no hidden options, no extra env vars, nothing lurking. shift, mask, done. go forth and parse your EOM optional data present fields with confidence, you absolute scholar πŸ§šπŸ’œ

signing off β€” this was the libnvme(2) man page for enum nvme_eom_optional_data_present, dated July 2026. mwah. πŸ’‹

πŸ“¦ where this page comes from