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
F153841991: D56429.id175670.diff
Fri, Apr 24, 4:44 AM
Unknown Object (File)
Wed, Apr 22, 6:46 AM
Unknown Object (File)
Wed, Apr 22, 6:32 AM
Unknown Object (File)
Wed, Apr 22, 5:09 AM
Unknown Object (File)
Wed, Apr 22, 4:52 AM
Unknown Object (File)
Wed, Apr 22, 2:41 AM
Unknown Object (File)
Mon, Apr 20, 7:29 AM
Unknown Object (File)
Sun, Apr 19, 7:55 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 72257
Build 69140: arc lint + arc unit

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!