Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rw_nvram(2) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

netconfig(8n)



RW_NVRAM(2)             COMMAND REFERENCE             RW_NVRAM(2)



NAME
     rw_nvram - read or write the contents of a nonvolatile
     memory

SYNOPSIS
     #include <machine/nvram.h>

     rwnvram(nvramnumber, rw, bufp, size)
     int nvramnumber, rw;
     uchar *bufp;
     int size;

DESCRIPTION
     Rwnvram reads or writes size bytes of the  nonvolatile
     memory (nvram) specified by nvram_number from/to the buffer
     at bufp. The first byte of the nvram is always an 8 bit
     checksum.  The checksum value provided by the user on a
     write is ignored.  The second byte of the nvram is a version
     number used to interpret the rest of the contents of the
     nvram.

     A value of NV_GLOBAL in nvram_number selects the global
     system nvram.  Other nvrams are identified by the slot
     number of the board on which they reside.  If rw is NV_READ,
     the nvram is to be read.  A value of NV_WRITE indicates the
     nvram is to be written.

DIAGNOSTICS
     Rw_nvram will fail when one of the following occurs:

     [EBADF]
         The nvram specified by nvram_number does not exist.

     [EFAULT]
         Bufp points outside the allocated address space.

     [ENOTTY]
         The function requested in rw is not valid.

     [EINVAL]
         Size is negative or larger than the size of the nvram.

     [EPERM]
         The caller requesting a write operation is not the
         super-user.

     [EIO]
         An I/O error occurred while accessing the device.

RETURN VALUE
     Upon successful completion, a value of 0 is returned.
     Otherwise, a value of -1 is returned and errno is set to



Printed 10/17/86                                                1





RW_NVRAM(2)             COMMAND REFERENCE             RW_NVRAM(2)



     indicate the error.

SEE ALSO
     netconfig(8n).



















































Printed 10/17/86                                                2





































































%%index%%
na:72,102;
sy:174,790;
de:964,861;
di:1825,653;
rv:2478,210;2832,26;
se:2858,141;
%%index%%000000000115

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026