overlay_pre...le_overwrite(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 overlay_prevent_phandle_overwrite(9) 🌸

okay bestie, you're reading the section 9 page for overlay_prevent_phandle_overwrite β€” yes, it's a mouthful, yes it's worth it πŸ’… this is the Kernel API Manual, so buckle up πŸŽ€


✨ NAME ✨

overlay_prevent_phandle_overwrite β€” the function that fixes your overlay phandles so they don't go stomping all over the base phandles 😀 like, respectfully, stay in your lane πŸ’€


πŸ¦‹ SYNOPSIS πŸ¦‹

int overlay_prevent_phandle_overwrite (void *fdt , void *fdto );

literally that's the whole call, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • fdt β€” the base Device Tree blob 🫢
  • fdto β€” the device tree overlay blob 🌈

πŸ’– DESCRIPTION πŸ’–

so here's the vibe check πŸ‘‘ it checks recursively whether applying fdto would overwrite phandle values in the base dtb. and when it finds one of those sneaky little phandles? it changes the fdto to use the fdt's phandle value instead β€” because otherwise you'd break references in the base, and we are not doing that today, periodt πŸ™ˆ


πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • Negative error code on failure 😭

🧚 SEE ALSO 🧚

the kernel file:

./scripts/dtc/libfdt/fdt_overlay.c

and the whole friend group, all of these icons πŸ‘‘βœ¨:


ngl, if you're deep in scripts/dtc/libfdt at this point you already know what's up. slay. πŸ’…

okay that's the page!! this one lives in ./scripts/dtc/libfdt, dated October 2026, and honestly? iconic πŸ’œ mwah, go fix those phandles bestie 🫢

πŸ“¦ where this page comes from