Page MenuHomeFreeBSD

stand/libofw: make OF_hasprop() part of the library
ClosedPublic

Authored by mhorne on Apr 16 2026, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 6:32 PM
Unknown Object (File)
Sun, May 17, 6:25 PM
Unknown Object (File)
Thu, May 14, 3:42 AM
Unknown Object (File)
Thu, May 14, 3:31 AM
Unknown Object (File)
Thu, May 14, 2:40 AM
Unknown Object (File)
Wed, May 13, 1:37 PM
Unknown Object (File)
Mon, May 11, 3:42 PM
Unknown Object (File)
Mon, May 4, 2:13 PM
Subscribers

Details

Summary

Currently it is only needed by powerpc ofwfdt.c, and defined statically
there. Make it available as part of libofw, mirroring what we have in
the kernel.

Two small tweaks are made to the implementation:

  1. Return type is changed to bool
  2. Return 'true' when OF_getproplen() == 0. This matches the expected semantics of the kernel version, described in OF_hasprop(9).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good; do we have a manpage with the other OF_ methods?

Looks good; do we have a manpage with the other OF_ methods?

Yes, they are all in one, OF_getprop.9. I did not look in depth for what might be missing.

This revision is now accepted and ready to land.Apr 16 2026, 5:44 PM

ah it's already there. yay!