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*_SHIFTones you're shifting, and if you're reaching for the*_MASKones 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
- 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