fdt_property(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fdt_property(9) πŸ’–

okay so bestie, welcome to the fdt_property(9) page β€” it's from the Kernel API Manual, lives down in ./scripts/dtc/libfdt, and ngl this is one of those little functions that's so specific about when you're allowed to call it. let's get into it πŸ¦‹


✨ NAME ✨

fdt_property β€” add a property to the current node πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int fdt_property (void *fdt , const char *name , const void *val , int
len );

like, copy that exactly, no cap, the argument order literally matters 😭


🌸 ARGUMENTS 🌸

  • fdt β€” pointer to the device tree blob 🫢 that's your whole tree, the main character
  • name β€” the name of the property you're adding ✨
  • val β€” pointer to the property value πŸ‘‘
  • len β€” how long that property value is, in bytes ⭐

🌈 DESCRIPTION 🌈

so fdt_property adds a property with the given name and val to the current node β€” and this happens during sequential write, which is the key vibe check here πŸ”₯

the big rule: this function can only be called between fdt_begin_node and fdt_end_node. like, that's it, that's the window. call it anywhere else and you're gonna have a bad time πŸ™ˆ


πŸ’œ RETURN πŸ’œ

  • 0 β€” on success, slay πŸ’…βœ¨
  • -FDT_ERR_NOSPACE β€” if there's insufficient space in the blob 😭 your tree said "no room bestie"
  • -FDT_ERR_BADSTATE β€” if you're not currently within a node πŸ’€ you tried to add a property outside the fdt_begin_node / fdt_end_node window

🧚 SEE ALSO 🧚

okay this list is iconic and also enormous, so buckle up β€” also peep the kernel file ./scripts/dtc/libfdt/libfdt.h while you're at it πŸ“


🫢 reminder bestie: fdt_property only works between fdt_begin_node and fdt_end_node. that's not me being dramatic, that's literally the manpage. periodt. πŸ’…

and that's the whole page!! this lil guy ships out of the kernel's ./scripts/dtc/libfdt directory, dated October 2026, and it's filed under fdt_property(9) β€” ok bye, go build a device tree, you're gonna eat πŸ’–πŸŒˆβœ¨

πŸ“¦ where this page comes from