libnvme(9)
π libnvme β bestie edition π
okay so this page is from the libnvme API manual (yes, the libnvme(9) one, section 9, we love a niche section number), and it's honestly so short it's basically a little snack. it's all about one enum. one! and the way that this enum is lowkey the key to reading a packed bitfield β obsessed. let's get into it π«Ά
β¨ NAME β¨
enum nvme_boot_partition_info β this field indicates the boot partition information. that's it, that's the whole vibe. it's giving "small but mighty" π
πΈ SYNOPSIS πΈ
enum nvme_boot_partition_info {
NVME_BOOT_PARTITION_INFO_BPSZ_SHIFT ,
NVME_BOOT_PARTITION_INFO_ABPID_SHIFT ,
NVME_BOOT_PARTITION_INFO_BPSZ_MASK ,
NVME_BOOT_PARTITION_INFO_ABPID_MASK
};
literally four constants. four. and every single one of them is about extracting info out of the struct nvme_boot_partition.bpinfo field. it's a shift-and-mask situation, iykyk π¦
π Constants π
so here's the group chat roll call β all four of these are for pulling stuff out of the struct nvme_boot_partition.bpinfo field, no cap:
NVME_BOOT_PARTITION_INFO_BPSZ_SHIFTβ the shift amount you use to get the boot partition size out of thestruct nvme_boot_partition.bpinfofield. shift it, slay it, done π«NVME_BOOT_PARTITION_INFO_ABPID_SHIFTβ the shift amount you use to get the active boot partition ID out of thestruct nvme_boot_partition.bpinfofield. same field, different little guy πNVME_BOOT_PARTITION_INFO_BPSZ_MASKβ the mask you use to get the boot partition size out of thestruct nvme_boot_partition.bpinfofield. mask reveal moment, iconic β¨NVME_BOOT_PARTITION_INFO_ABPID_MASKβ the mask you use to get the active boot partition ID out of thestruct nvme_boot_partition.bpinfofield. matching set with the shift above, we love a coordinated outfit π
fr fr bestie, notice how all four of them are about that one bpinfo field. two shifts, two masks, two things being extracted (boot partition size + active boot partition ID). that's the whole entire page. no extra lore, no hidden options, not me checking twice π
and that's the tea β β page originally dated October 2026, from the libnvme API Manual, section 9 (libnvme(9)). go forth and mask some bits, you absolute main character ππ
π¦ 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