HomeFreeBSD

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

Description

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

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).

Reviewed by: manu, imp, adrian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56429

Details

Provenance
mhorneAuthored on Apr 16 2026, 5:48 PM
Reviewer
manu
Differential Revision
D56429: stand/libofw: make OF_hasprop() part of the library
Parents
rGfa77fecb0e06: pkru.3: Note that the kernel may not respect PKRU protections
Branches
Unknown
Tags
Unknown