The calls that take and/or return a variable
use a pointer to an
int
variable for this purpose;
others use a pointer to an
struct pnviocdesc
descriptor,
which contains a variable and two counted strings.
The first string comprises the fields
pnv_namelen
(an
int)
and
pnv_name
(a
char *),
giving the name of a field.
The second string comprises the fields
pnv_buflen
and
pnv_buf,
used analogously.
These two counted strings work in a
``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.
The following ioctls are supported:
NULL
is passed as the variable name, the first variable name
will be returned.
If the last variable is given as an argument, the ioctl will return
EINVAL.
PNVIOCGETPNVIOCSETPNVIOCGETNUMGE/dev/nvram
EINVAL]EINVAL]
PowerPC Reference Platform Specification Version 1.1, Section 5.5
PNVIOCSET
is not currently supported, making the
nvram
driver read-only at this time.