fdt_setprop_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fdt_setprop_empty(9) πŸ’–

okay so real talk, we're in the Linux kernel API manual today, specifically the fdt_setprop_empty(9) page, and honestly? it's a little baddie. lowkey does exactly what it says on the tin and we respect that 🫢


✨ NAME ✨

fdt_setprop_empty β€” set a property to an empty value. that's it. that's the whole vibe. a property, but make it nothing. zero length. iconique πŸ’…


🌸 SYNOPSIS 🌸

fdt_setprop_empty (fdt , nodeoffset , name );

πŸŽ€ ARGUMENTS πŸŽ€

  • fdt β€” pointer to the device tree blob. yes bestie, the whole blob. the main character πŸ¦‹
  • nodeoffset β€” offset of the node whose property to change
  • name β€” name of the property to change

πŸ’œ DESCRIPTION πŸ’œ

okay so fdt_setprop_empty sets the value of the named property in the given node to an empty (zero length) value. or ! if that property doesn't already exist, it creates a brand new empty property for you. it's giving "make it exist, but make it nothing" ✨

⚠️ heads up bestie, this is the important part: this function may insert or delete data from the blob, and will therefore change the offsets of some existing nodes. so like... any nodeoffset you were holding onto before this call? do a vibe check on it afterwards, fr fr 😭

πŸ”₯ RETURN πŸ”₯

  • 0 β€” on success πŸŽ‰
  • -FDT_ERR_NOSPACE β€” there is insufficient free space in the blob to contain the new property value. basically the blob said "no room, bestie" πŸ’€
  • -FDT_ERR_BADOFFSET β€” nodeoffset did not point to FDT_BEGIN_NODE tag
  • -FDT_ERR_BADLAYOUT
  • -FDT_ERR_BADMAGIC
  • -FDT_ERR_BADVERSION
  • -FDT_ERR_BADSTATE
  • -FDT_ERR_BADSTRUCTURE
  • -FDT_ERR_BADLAYOUT (yes, again β€” that's genuinely how the page lists it, not a typo on my end πŸ™ˆ)
  • -FDT_ERR_TRUNCATED
  • and the rest of the errors are just standard meanings, iykyk

🌈 SEE ALSO 🌈

bestie, buckle up, this list is long and we are not skipping a single one of them, not today πŸ‘‘

start with the Kernel file ./scripts/dtc/libfdt/libfdt.h, then:


and that's the page!! πŸ’– this lil diva lives in ./scripts/dtc/libfdt and the docs are dated October 2026 β€” so like, future-core of them honestly ⭐ slay, go forth and set some empty properties, bestie 🧚

πŸ“¦ where this page comes from