fdt_resize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fdt_resize(9) ✨

okay so real talk, bestie β€” this is a page from the Kernel API Manual, and today's main character is fdt_resize(9). it's giving "glow-up for your device tree" energy and honestly? obsessed. let's get into it πŸ’…


🌸 NAME 🌸

fdt_resize β€” move and resize a device tree in sequential write state πŸ¦‹

like, it literally picks your device tree up, sets it down somewhere else, and makes it fit. no cap.


πŸŽ€ SYNOPSIS πŸŽ€

int fdt_resize (void *fdt , void *buf , int bufsize );

that's the whole vibe. three args, one int back. iconic.


πŸ’– ARGUMENTS πŸ’–

  • fdt β€” pointer to the device tree you wanna resize 🫢 this is the one getting the makeover.
  • buf β€” the buffer where the resized tree should be placed ✨ new home, new you.
  • bufsize β€” the size of the buffer at buf πŸ“ gotta know how much room we're working with, fr fr.

🌈 DESCRIPTION 🌈

so fdt_resize moves the device tree blob from fdt to buf, and resizes it to fit in the new buffer size. that's it, that's the whole plot. it's a relocation and a fitting appointment in one βœ¨πŸ’…


πŸ”₯ RETURN πŸ”₯

here's the receipts, bestie β€” it can come back with:

  • 0 β€” on success πŸ‘‘ slay, we love a zero.
  • -FDT_ERR_NOSPACE β€” if bufsize is too small 😭 like, the buffer said no room at the inn.
  • -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE β€” standard meanings πŸ’€ you know what those mean, they're keeping their usual vibe check energy.

🧚 SEE ALSO 🧚

the whole fdt fam showed up for this one, and i mean the whole fam β€” no one got left on read πŸ’œ


okay that's the whole page, bestie β€” and before you go, the ✨ receipts ✨: this one lives under ./scripts/dtc/libfdt, stamped October 2026, and it's fdt_resize(9) all day. mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from