fdt_add_subnode_namelen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is fdt_add_subnode_namelen(9), straight outta the Kernel API Manual, and it creates a new node based on substring. that's the whole assignment, bestie. πŸ’…βœ¨

✨ SYNOPSIS ✨

the signature is giving:

int fdt_add_subnode_namelen (void *fdt , int parentoffset , const char
       *name , int namelen );

πŸŽ€ ARGUMENTS πŸŽ€

  • fdt β€” pointer to the device tree blob. 🫢
  • parentoffset β€” structure block offset of a node.
  • name β€” name of the subnode to create. 🌸
  • namelen β€” number of characters of name to consider.

πŸ¦‹ DESCRIPTION πŸ¦‹

it's literally identical to fdt_add_subnode, except it only uses the first namelen characters of name as the name of the new node. no cap.

so it's useful for creating subnodes based on a portion of a larger string β€” such as a full path. periodt. πŸ’…

🌸 RETURN 🌸

returns the structure block offset of the created subnode (>=0) when it works, or a negative libfdt error value otherwise 😭.

πŸ”₯ SEE ALSO πŸ”₯

the kernel file is ./scripts/dtc/libfdt/libfdt.h, and here's the full squad β€” every single one, no cuts:


mwah πŸ’‹ this page comes from ./scripts/dtc/libfdt and is dated October 2026 β€” that's the cute little footer, bestie. πŸ’–πŸ‘‘

πŸ“¦ where this page comes from