ldm_parse_tocblock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« ldm_parse_tocblock(9) πŸ’«

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” this one's a single little function from the kernel's LDM (that's Logical Disk Manager, iykyk) partition code, and it's honestly so straightforward it's giving main character energy. Let's get into it ✨


🌸 NAME 🌸

ldm_parse_tocblock β€” Read the LDM Database TOCBLOCK structure 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

bool ldm_parse_tocblock (const u8 *data , struct tocblock *toc );

like, that's the whole vibe. one call, two args, one bool back πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • data β€” the raw database TOCBLOCK structure, freshly loaded off the device. literally the bytes straight from the disk, no cap πŸ“
  • toc β€” the in-memory toc structure where the parsed info gets handed back to you. it's your lil output basket 🧺✨

πŸ”₯ DESCRIPTION πŸ”₯

So what does it do? It parses the LDM Database TOCBLOCK (that's table of contents, bestie β€” yes, the boring-sounding one, but it's important πŸ’€) structure that you handed in via data, and it sets up the in-memory tocblock structure toc with all the info it pulled out. simple as that, and it ate πŸ’…

N.B. ⚠️ the *_start and *_size values that come back to you in toc are not range-checked. like, at all. so pls don't just trust them blindly, okay? that's on you, not on this function πŸ™ˆ no cap, this is a real caveat, do not sleep on it.

πŸ’€ RETURN πŸ’€

(nothing listed here in the original β€” the return type up in the synopsis is bool, and that's all the docs give us bestie, don't @ me 😭)


🌈 SEE ALSO 🌈

Kernel file ./block/partitions/ldm.c β€” plus the whole friend group of LDM helpers, all here for you 🫢✨

like, that's the entire squad πŸ‘‘ go read them too, they're all part of the same LDM story fr fr.


and that's the page!! sign-off time: this lil beauty lives in ./block/partitions, dated October 2026 β€” iconic, timeless, obsessed πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from