libnvme(9)
π NAME π
okay bestie, welcome to libnvme(9) β the manual page (API Manual, no less π) that's about one specific enum, and honestly? she's lowkey iconic for a struct field helper.
enum nvme_id_ctrl_plsi β Power Loss Signaling Information β¨
πΈ SYNOPSIS πΈ
so here's the whole thing, exactly as written, no cap:
enum nvme_id_ctrl_plsi {
NVME_CTRL_PLSI_PLSEPF_SHIFT ,
NVME_CTRL_PLSI_PLSFQ_SHIFT ,
NVME_CTRL_PLSI_PLSEPF_MASK ,
NVME_CTRL_PLSI_PLSFQ_MASK
};
that's it. that's the enum. four constants, zero drama (until the power fails, see below π).
π¦ Constants π¦
these four little icons are your cheat codes for pulling info out of the struct nvme_id_ctrl.plsi field. shift and mask, mask and shift, the classic duo π
NVME_CTRL_PLSI_PLSEPF_SHIFTβ this is the shift amount you use to get the PLS Emergency Power Fail out of thestruct nvme_id_ctrl.plsifield. slide those bits over, bestie π«ΆNVME_CTRL_PLSI_PLSFQ_SHIFTβ this one is the shift amount for getting the PLS Forced Quiescence out of thestruct nvme_id_ctrl.plsifield. different shift, different vibe β¨NVME_CTRL_PLSI_PLSEPF_MASKβ the mask that gets you the PLS Emergency Power Fail from thestruct nvme_id_ctrl.plsifield. it's giving filter, but make it bitwise πNVME_CTRL_PLSI_PLSFQ_MASKβ and this is the mask for grabbing the PLS Forced Quiescence out of that samestruct nvme_id_ctrl.plsifield. same field, same energy, different bit mask π
ngl the whole trick here is: the field is <hotpink>plsi</hotpink>, and these constants are the only blessed way to peek inside it. don't go inventing your own shifts fr fr π
k that's the whole page, mwah π β this was enum nvme_id_ctrl_plsi from the libnvme(9) API Manual, dated October 2026. go forth and mask responsibly, bestie ππ¦β
π¦ 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