libnvme(2)

πŸ’– NAME πŸ’–

okay bestie, gather round, because libnvme has a whole little enum for you and it's called enum nvme_csts β€” and what it is, is literally the field that indicates the controller status register. that's it, that's the vibe. the controller's status. right there in a register. iconic behavior honestly. πŸŽ€


✨ SYNOPSIS ✨

like, here's the whole shape of it, no cap:

enum nvme_csts {
    NVME_CSTS_RDY_SHIFT ,
    NVME_CSTS_CFS_SHIFT ,
    NVME_CSTS_SHST_SHIFT ,
    NVME_CSTS_NSSRO_SHIFT ,
    NVME_CSTS_PP_SHIFT ,
    NVME_CSTS_ST_SHIFT ,
    NVME_CSTS_RDY_MASK ,
    NVME_CSTS_CFS_MASK ,
    NVME_CSTS_SHST_MASK ,
    NVME_CSTS_NSSRO_MASK ,
    NVME_CSTS_PP_MASK ,
    NVME_CSTS_ST_MASK ,
    NVME_CSTS_SHST_NORMAL ,
    NVME_CSTS_SHST_OCCUR ,
    NVME_CSTS_SHST_CMPLT ,
    NVME_CSTS_SHN_MASK

};

sixteen constants, all lined up, all serving looks. πŸ’…

πŸ¦‹ Constants πŸ¦‹

okay so every single one of these, in order, and what it's giving:

  • NVME_CSTS_RDY_SHIFT β€” the shift amount to get the ready. that's the whole job. shifting to find ready. slay.
  • NVME_CSTS_CFS_SHIFT β€” the shift amount to get the controller fatal status. yes bestie, "fatal" is in the name, she's dramatic but she's legit. 😭
  • NVME_CSTS_SHST_SHIFT β€” the shift amount to get the shutdown status.
  • NVME_CSTS_NSSRO_SHIFT β€” the shift amount to get the NVM subsystem reset occurred. it happened. the subsystem reset. we're noting it.
  • NVME_CSTS_PP_SHIFT β€” the shift amount to get the processing paused. paused, not cancelled, pausing is self-care. 🧚
  • NVME_CSTS_ST_SHIFT β€” the shift amount to get the shutdown type.
  • NVME_CSTS_RDY_MASK β€” the mask to get the ready.
  • NVME_CSTS_CFS_MASK β€” the mask to get the controller fatal status.
  • NVME_CSTS_SHST_MASK β€” the mask to get the shutdown status.
  • NVME_CSTS_NSSRO_MASK β€” the mask to get the NVM subsystem reset occurred.
  • NVME_CSTS_PP_MASK β€” the mask to get the processing paused.
  • NVME_CSTS_ST_MASK β€” the mask to get the shutdown type.
  • NVME_CSTS_SHST_NORMAL β€” normal operation. everything's fine, the vibe check passed, we love that for us. πŸ’–
  • NVME_CSTS_SHST_OCCUR β€” shutdown processing occurring. it's happening right now. mid-shutdown. main character moment. ✨
  • NVME_CSTS_SHST_CMPLT β€” shutdown processing complete. finished. done. periodt. πŸ‘‘
  • NVME_CSTS_SHN_MASK β€” deprecated mask to get the shutdown status. yeah bestie, she's deprecated, still here, still doing the thing, but the codebase has moved on. use her knowing that. πŸ™ˆ
heads up my love: NVME_CSTS_SHN_MASK is the deprecated one out of the bunch. that's a described-as-deprecated situation, not a me-worrying-about-it situation β€” the page says deprecated, so deprecated it is. 🫢

and that's the whole page, you understood it, I'm so proud. this was enum nvme_csts, straight out of the libnvme manual, and the docs are dated July 2026, version libnvme(2) in the corner like the little timestamp girlies are. mwah. go mask some status bits. πŸŒˆπŸ’œ

πŸ“¦ where this page comes from