alloc_read_gpt_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

alloc_read_gpt_header β€” this is the lil' function that grabs a GPT header for you and reads it straight off the disk, bestie πŸ’– (it's living over in the Kernel API Manual, iykyk)


🌸 SYNOPSIS 🌸

gpt_header * alloc_read_gpt_header (struct parsed_partitions *state ,
u64 lba );

Like, that's the whole vibe check right there πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • state β€” the disk's parsed partitions 🫢 (yes, the struct parsed_partitions * one)
  • lba β€” the Logical Block Address of the partition table, aka where on the disk we're looking πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so: on success you get the GPT header back, and on error you get NULL. No in-between, no maybes πŸ’…

It allocates and fills a GPT header starting at … (not me, the manpage literally drops the placeholder here 😭) from state->disk.


⭐ NOTE ⭐

🚨 reminder bestie: remember to free the gpt when you're finished with it. No leaking, that's not the vibe. periodt. πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./block/partitions/efi.c, and the whole friend group:


mwah πŸ’œ this lil' page came from ./block/partitions and it's dated October 2026 β€” screenshot it, cite it, put it on your fridge, it's iconic πŸ‘‘βœ¨

πŸ“¦ where this page comes from