libnvme(9)
π NAME π
ok so this is libnvme(9) β the API manual, bestie, and today's main character is enum nvme_st_code β it's literally the Self-test Code value β¨
π SYNOPSIS π
enum nvme_st_code {
NVME_ST_CODE_RESERVED ,
NVME_ST_CODE_SHORT ,
NVME_ST_CODE_EXTENDED ,
NVME_ST_CODE_HOST_INIT ,
NVME_ST_CODE_VS ,
NVME_ST_CODE_ABORT ,
NVME_ST_CODE_SHIFT ,
NVME_ST_CODE_MASK
};
likeβ¦ look at her. she's an enum. she's giving "small but mighty" π¦
πΈ Constants πΈ
NVME_ST_CODE_RESERVEDβ Reserved. that's it. that's the whole vibe. it's the placeholder seat at the lunch table, nobody's sitting there πNVME_ST_CODE_SHORTβ Short device self-test operation. the speedrun of self-tests, ngl πββοΈπ¨NVME_ST_CODE_EXTENDEDβ Extended device self-test operation. the full-length director's cut, no skips, highkey thorough πNVME_ST_CODE_HOST_INITβ Host-Initiated Refresh operation. you started this one, bestie β it's giving main character energy π₯NVME_ST_CODE_VSβ Vendor specific. iykyk β this one's between you and your vendor, fr fr π€«NVME_ST_CODE_ABORTβ Abort device self-test operation. not me hitting the brakes mid-test π βNVME_ST_CODE_SHIFTβ Shift amount to get the code value from thestruct nvme_st_result.dstsfield. it's literally the math that gets you the code you actually want out of that.dstsfield β respectful king of bit manipulation π§β¨NVME_ST_CODE_MASKβ Self-test code mask. wear it, it keeps your bits cute and contained π
π quick vibe check: keep those literals exactly as they are, bestie βNVME_ST_CODE_SHIFTandNVME_ST_CODE_MASKare doing important bitwise work and we do not mess with the bitwise work π
and that's the page!! π«Ά this lil' gem dropped in October 2026 as part of the libnvme(9) API manual β go forth and self-test responsibly, stunner βπ
π¦ where this page comes from
- arch rolling: nvme-cli 3.2-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms