| Main index | Section 9 | Options |
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
OF_node_from_xref() returns the kernel phandle for the effective phandle xref. If one cannot be found or the OpenFirmware implementation does not support effective phandles, the function returns the input value.
OF_xref_from_node() returns the effective phandle for the kernel phandle node. If one cannot be found or the OpenFirmware implementation does not support effective phandles, the function returns the input value.
phandle_t panelnode, panelxref;
char *model;
if (OF_getencprop(node, "lcd-panel", &panelxref) <= 0)
return;
panelnode = OF_node_from_xref(panelxref);
if (OF_getprop_alloc(hdminode, "model", (void **)&model) <= 0)
return;
| OF_NODE_FROM_XREF (9) | April 9, 2018 |
| Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology. | ” |
| — The Unix Haters' handbook | ||