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 thestruct nvme_phy_rx_eom_log.odpfield. slide it over, bestie β¨NVME_EOM_ODP_EDFP_SHIFTβ the shift amount for getting the eye data field present out of that samestruct nvme_phy_rx_eom_log.odpfield.NVME_EOM_ODP_RSVD_SHIFTβ shift amount to grab the reserved optional data present fromstruct 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 fromstruct nvme_phy_rx_eom_log.odp. masking era πNVME_EOM_ODP_EDFP_MASKβ mask for getting the eye data field present fromstruct nvme_phy_rx_eom_log.odp.NVME_EOM_ODP_RSVD_MASKβ mask to get the reserved data present fromstruct nvme_phy_rx_eom_log.odp.
lowkey the whole page is about one.odpfield insidestruct nvme_phy_rx_eom_logand 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
- 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