p The calls that take and/or return a node use a pointer to an .Li int variable for this purpose; others use a pointer to an .Li struct opiocdesc descriptor, which contains a node and two counted strings. The first string comprises the fields .Li op_namelen (an .Li int ) and .Li op_name (a .Li "char *" ) , giving the name of a field. The second string comprises the fields .Li op_buflen and .Li op_buf , used analogously. These two counted strings work in a .Dq value-result fashion. At entry to the ioctl, the counts are expected to reflect the buffer size; on return, the counts are updated to reflect the buffer contents.
p The following ioctls are supported: l -tag -width OPIOCGETOPTNODE t Dv OPIOCGETOPTNODE Takes nothing, and fills in the options node number. t OPIOCGETNEXT Takes a node number and returns the number of the following node. The node following the last node is number 0; the node following number 0 is the first node. t Dv OPIOCGETCHILD Takes a node number and returns the number of the first .Dq child of that node. This child may have siblings; these can be discovered by using .Dv OPIOCGETNEXT . t Dv OPIOCGET Fills in the value of the named property for the given node. If no such property is associated with that node, the value length is set to -1. If the named property exists but has no value, the value length is set to 0. t Dv OPIOCSET Writes the given value under the given name. The OPENPROM may refuse this operation; in this case .Dv EINVAL is returned. t Dv OPIOCNEXTPROP Finds the property whose name follows the given name in OPENPROM internal order. The resulting name is returned in the value field. If the named property is the last, the .Dq next name is the empty string. As with .Dv OPIOCGETNEXT , the next name after the empty string is the first name. .El .Sh FILES
a /dev/openprom .Sh ERRORS The following may result in rejection of an operation: l -tag -width Er t Bq Er EINVAL The given node number is not zero and does not correspond to any valid node, or is zero where zero is not allowed. t Bq Er EBADF The requested operation requires permissions not specified at the call to .Fn open . t Bq Er ENAMETOOLONG The given name or value field exceeds the maximum allowed length (8191 bytes). .El .Sh SEE ALSO .Xr ioctl 2
p .Lk http://www.openfirmware.org/1275/ "IEEE 1275 Open Firmware" .Sh BUGS Due to limitations within the .Nm itself, these functions run at elevated priority and may adversely affect system performance.
p The .Tn Sun .Nm is what became the Open Firmware
q Tn IEEE 1275 standard for processor and system independent boot firmware.