libnvme(2)

✨ libnvme β€” section 2 of the manual, bestie ✨

okay so real talk: this is the libnvme API manual, section 2, and today we're hyperfixating on one (1) enum. it's giving "tiny struct field, enormous lore." let's get into it πŸ’…

🌸 NAME 🌸

enum nvme_id_ctrl_bpcap β€” Boot Partition Capabilities. yes ma'am, that's the whole name. short. iconic. no notes.


πŸŽ€ SYNOPSIS πŸŽ€

enum nvme_id_ctrl_bpcap {
    NVME_CTRL_BACAP_RPMBBPWPS_SHIFT ,
    NVME_CTRL_BACAP_SFBPWPS_SHIFT ,
    NVME_CTRL_BACAP_RPMBBPWPS_MASK ,
    NVME_CTRL_BACAP_SFBPWPS_MASK ,
    NVME_CTRL_BACAP_RPMBBPWPS_NOT_SPECIFIED ,
    NVME_CTRL_BACAP_RPMBBPWPS_NOT_SUPPORTED ,
    NVME_CTRL_BACAP_RPMBBPWPS_SUPPORTED

};

like, look at her. seven whole constants. she ate and left no crumbs 🫢


⭐ Constants ⭐

  • NVME_CTRL_BACAP_RPMBBPWPS_SHIFT β€” this is the shift amount, bestie. you use it to get the RPMB Boot Partition Write Protection Support out of the struct nvme_id_ctrl.bpcap field. shifting is the move 🧚
  • NVME_CTRL_BACAP_SFBPWPS_SHIFT β€” same energy, different feature: the shift amount to get the Set Features Boot Partition Write Protection Support</... wait, no, hold on β€” the Set Features Boot Partition Write Protection Support out of that same struct nvme_id_ctrl.bpcap field. one field, so much drama 😭
  • NVME_CTRL_BACAP_RPMBBPWPS_MASK β€” the mask for getting the RPMB Boot Partition Write Protection Support from struct nvme_id_ctrl.bpcap. shift then mask. that's the ritual, iykyk πŸ”₯
  • NVME_CTRL_BACAP_SFBPWPS_MASK β€” the mask for getting the Set Features Boot Partition Write Protection Support from struct nvme_id_ctrl.bpcap. yes it's a whole parallel universe of constants, she's thorough πŸ’œ
  • NVME_CTRL_BACAP_RPMBBPWPS_NOT_SPECIFIED β€” support for RPMB Boot Partition Write Protection is not specified. it's giving "we simply don't know, and that's valid." πŸ¦‹
  • NVME_CTRL_BACAP_RPMBBPWPS_NOT_SUPPORTED β€” RPMB Boot Partition Write Protection is not supported by this controller. the controller said no πŸ’€
  • NVME_CTRL_BACAP_RPMBBPWPS_SUPPORTED β€” RPMB Boot Partition Write Protection is supported by this controller. we love a supportive controller. main character energy fr fr πŸ‘‘
no cap, every single one of these is about reading bits out of the bpcap field of struct nvme_id_ctrl β€” some are shift amounts, some are masks, some are the actual values. don't mix 'em up or the vibe check will fail πŸ™ˆ

and that's the whole page, bestie πŸ’– this was enum nvme_id_ctrl_bpcap from libnvme(2), dated July 2026 β€” go forth, shift responsibly, and stan a well-documented bitfield βœ¨πŸŽ€

πŸ“¦ where this page comes from