fdt_offset_ptr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

hi bestie πŸ’– this is the fdt_offset_ptr(9) page from the Kernel API Manual, and it’s lowkey a safety baddie. no cap.

πŸ’– NAME πŸ’–

  • fdt_offset_ptr β€” safely get a byte range within the device tree blob. periodt. ✨

✨ SYNOPSIS ✨

const void * fdt_offset_ptr (const void *fdt , int offset , unsigned int checklen );

🫢 ARGUMENTS 🫢

  • fdt β€” pointer to the device tree blob, bestie.
  • offset β€” offset within the blob to the desired byte range.
  • checklen β€” required length of the byte range. like, how many bytes u need, fr fr.

🌸 DESCRIPTION 🌸

okay so fdt_offset_ptr returns a pointer to the byte range of length checklen at the given offset within the device tree blob. but first it does the vibe check: it verifies that the byte range fits entirely within the blob and does not overflow. the safety of it all is the main character energy πŸ’…

πŸŽ€ RETURN πŸŽ€

on success, u get a pointer to the byte range. if the requested range does not fit within the blob, u get NULL. that’s the whole return situation, no cap. 🫢

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./scripts/dtc/libfdt/libfdt.h β€” plus the whole fdt friend group:


p.s. this page comes from ./scripts/dtc/libfdt, dated October 2026 β€” source/version and date noted, mwah πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from