libnvme(2)

πŸ’… libnvme(2) β€” the API Manual, bestie edition ✨

okay so we're in libnvme's manual, section 2, and today's main character is a lil enum called nvme_pmrsts 🫢


🌸 NAME 🌸

enum nvme_pmrsts β€” bestie, this field literally indicates the persistent memory region status πŸ’Ύβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

enum nvme_pmrsts {
    NVME_PMRSTS_ERR_SHIFT ,
    NVME_PMRSTS_NRDY_SHIFT ,
    NVME_PMRSTS_HSTS_SHIFT ,
    NVME_PMRSTS_CBAI_SHIFT ,
    NVME_PMRSTS_ERR_MASK ,
    NVME_PMRSTS_NRDY_MASK ,
    NVME_PMRSTS_HSTS_MASK ,
    NVME_PMRSTS_CBAI_MASK

};

like. look at her. eight constants, zero drama, all business πŸ˜ŒπŸ‘‘


πŸ¦‹ Constants πŸ¦‹

no cap, these are the little guys that live inside the enum. shifts and masks, shifts and masks, it's giving bit manipulation 🧚

  • NVME_PMRSTS_ERR_SHIFT β€” the shift amount you use to get the error πŸ’€
  • NVME_PMRSTS_NRDY_SHIFT β€” the shift amount you use to get the not ready πŸ™ˆ
  • NVME_PMRSTS_HSTS_SHIFT β€” the shift amount you use to get the health status 🩺
  • NVME_PMRSTS_CBAI_SHIFT β€” the shift amount you use to get the controller base address invalid 😭
  • NVME_PMRSTS_ERR_MASK β€” the mask you use to get the error πŸ’…
  • NVME_PMRSTS_NRDY_MASK β€” the mask you use to get the not ready ✨
  • NVME_PMRSTS_HSTS_MASK β€” the mask you use to get the health status 🌈
  • NVME_PMRSTS_CBAI_MASK β€” the mask you use to get the controller base address invalid πŸ”₯

ngl bestie, if you're reaching for the *_SHIFT ones you're shifting, and if you're reaching for the *_MASK ones you're masking. that's the whole vibe check. iykyk 🫢

and that's the whole page, periodt πŸ’– this was enum nvme_pmrsts from the libnvme API manual, section 2, signed off in July 2026 β€” go forth and decode those persistent memory region status bits, you absolute icon πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from