fdt_next_subnode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fdt_next_subnode β€” like, the kernel API manual page for fdt_next_subnode(9) ✨

okay bestie, welcome to fdt_next_subnode(9) from the Kernel API Manual β€” this is the little function that tells you where the next direct subnode lives. it's giving tour guide energy for your device tree πŸ’–


✨ NAME ✨

fdt_next_subnode β€” get offset of next direct subnode πŸ¦‹


🌸 SYNOPSIS 🌸

int fdt_next_subnode (const void *fdt , int offset );

literally that's the whole vibe. no cap, that's it ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • fdt β€” the FDT blob. your whole tree, your whole moment, the main character 🌈
  • offset β€” the offset of the previous subnode. yes bestie, you gotta know where you've been πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the whole ritual: you call fdt_first_subnode first, right? then you call this function over and over again in a loop to walk the direct subnodes of a parent node. that's the pattern. that's the assignment. periodt 🫢

🌸 lowkey key detail: it's fdt_first_subnode first, then this one repeatedly β€” this function does not kick off the walk, it continues it. fr fr ✨

⭐ RETURN ⭐

  • the offset of the next subnode β€” slay, you got one πŸŽ‰
  • -FDT_ERR_NOTFOUND β€” as in, there are no more subnodes πŸ’€ the walk is over, go home, the party's finished 😭

πŸ¦‹ SEE ALSO πŸ¦‹

the friend group is huge, so buckle up bestie, we're doing the whole roll call in order πŸ’–

🧚 and yeah, the kernel file to go poke at is ./scripts/dtc/libfdt/libfdt.h β€” that's where the sauce lives ✨

okay that's the whole page, bestie, you ate that πŸ“ this one's filed under ./scripts/dtc/libfdt and stamped October 2026 β€” go forth and iterate those subnodes, icon behavior only πŸ‘‘πŸ’…

πŸ“¦ where this page comes from