Page MenuHomeFreeBSD

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

Authored by mhorne on Thu, Apr 16, 4:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 20, 7:29 AM
Unknown Object (File)
Sun, Apr 19, 7:55 PM
Unknown Object (File)
Sun, Apr 19, 7:21 PM
Unknown Object (File)
Sun, Apr 19, 6:56 PM
Unknown Object (File)
Sat, Apr 18, 12:14 PM
Unknown Object (File)
Sat, Apr 18, 5:13 AM
Unknown Object (File)
Sat, Apr 18, 5:10 AM
Unknown Object (File)
Sat, Apr 18, 4:37 AM
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.Thu, Apr 16, 5:44 PM

ah it's already there. yay!