*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: OF_finddevice | Section: 9 | Source: FreeBSD | File: OF_finddevice.9.gz
OF_FINDDEVICE(9) FreeBSD Kernel Developer's Manual OF_FINDDEVICE(9) NAME OF_finddevice - find node in device tree SYNOPSIS #include <dev/ofw/ofw_bus.h> #include <dev/ofw/ofw_bus_subr.h> phandle_t OF_finddevice(const char *path); DESCRIPTION OF_finddevice() returns the phandle for the node specified by the path. Returns -1 if the path cannot be found in the tree. EXAMPLES phandle_t root, i2c; root = OF_finddevice("/"); i2c = OF_finddevice("/soc/axi/i2c@a0e0000"); if (i2c != -1) { ... } SEE ALSO OF_child(9), OF_parent(9), OF_peer(9) AUTHORS This manual page was written by Oleksandr Tymoshenko <[email protected]>. CAVEATS The return value should only be checked with equality operators (equal to, not equal to) and not relational comparison (less than, greater than ). There is a discrepancy between IEEE 1275 standard and FreeBSD's internal representation of a phandle: IEEE 1275 requires the return value of this function to be -1 if the path is not found. But phandle_t is an unsigned type, so it cannot be relationally compared with -1 or 0, this comparison is always true or always false. FreeBSD 14.1-RELEASE-p8 April 9, 2018 FreeBSD 14.1-RELEASE-p8

Navigation Options