fdt_size_cells(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 fdt_size_cells(9) 🌸

okay bestie, welcome to the Kernel API Manual β€” we're talking about the lil' device-tree helper that retrieves the address range size for a bus represented in the tree. No cap, it's giving β€œtree gossip” energy. πŸ¦‹

πŸ’– NAME πŸ’–

fdt_size_cells β€” retrieve address range size for a bus represented in the tree. Bestie, that's the whole name: it retrieves the address range size for a bus represented in the tree. Iconic. Slay. πŸ’…

✨ SYNOPSIS ✨

int fdt_size_cells (const void *fdt , int nodeoffset );

πŸŽ€ ARGUMENTS πŸŽ€

  • fdt β€” pointer to the device tree blob. Yes, the blob. The tree blob. Your fave data structure's passport. 🫢
  • nodeoffset β€” offset of the node to find the address range size for. Like, β€œwhich node are we checking, queen?” That's this. πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the vibe check: when the node has a valid #size-cells property, it returns its value. That's literally it, and it slays. It's not doing extra side quests. It's not starting drama. It reads the property, and if the property is valid, you get the value. Periodt. ✨

πŸ”₯ RETURN πŸ”₯

  • 0 <= n < FDT_MAX_NCELLS β€” on success πŸŽ‰ (yes, within this range, no cap)
  • 1 β€” if the node has no #size-cells property πŸ™ˆ
  • -FDT_ERR_BADNCELLS β€” if the node has a badly formatted or invalid #size-cells property πŸ’€
  • -FDT_ERR_BADMAGIC, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTATE, -FDT_ERR_BADSTRUCTURE, -FDT_ERR_TRUNCATED β€” standard meanings. Yep, the usual suspects, all with their standard meanings. 🫑

🌈 SEE ALSO 🌈

The whole fdt extended universe, lowkey linked up and ready for a group chat:


mwah πŸ’‹ β€” source/version: ./scripts/dtc/libfdt; date: October 2026. That's the cute little footer sign-off, bestie. Go forth and inspect those size cells, iykyk. πŸ§šπŸ’œ

πŸ“¦ where this page comes from