#include <kernel.h>
#include <memory.h>
#include <nvram.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.
Functions | |
| local | nvramHash (char *p) |
| Given an input string, this will calculate a simple hash between 0 and NVRAM_PAIRS-1 (inclusive). | |
| local | nvramInsert (struct nvram_tuple *tuple) |
| Insert a tuple into the nvram_tuples table. | |
| devcall | nvramInit () |
| Initialize the nvram variable structures for editing. | |
| char * | nvramGet (char *name) |
| Find the value of a variable. | |
Variables | |
| struct nvram_header * | nvram_header = NULL |
| header data for nvram | |
| struct nvram_tuple * | nvram_tuples [NVRAM_PAIRS] |
| array of pointers to tuples | |
Definition in file nvram.c.
| char* nvramGet | ( | char * | name | ) |
Find the value of a variable.
| *name | name of variable to find |
Definition at line 117 of file nvram.c.
References NULL, nvram_tuples, nvramHash(), nvramInit(), OK, and strlen().
Referenced by etherInit(), and xsh_nvram().


| local nvramHash | ( | char * | p | ) |
Given an input string, this will calculate a simple hash between 0 and NVRAM_PAIRS-1 (inclusive).
| *p | null or '=' terminated string |
Definition at line 145 of file nvram.c.
References NVRAM_PAIRS.
Referenced by nvramGet(), and nvramInsert().

| devcall nvramInit | ( | void | ) |
Initialize the nvram variable structures for editing.
Definition at line 26 of file nvram.c.
References memcpy(), memget(), NULL, nvram_header, NVRAM_LOCATION, NVRAM_MAGIC, NVRAM_PAIRS, nvram_tuples, nvramInsert(), OK, strlen(), and SYSERR.
Referenced by nvramGet(), sysinit(), and xsh_nvram().


| local nvramInsert | ( | struct nvram_tuple * | tuple | ) |
Insert a tuple into the nvram_tuples table.
| *tuple | pointer to tuple to add (should be memory address) |
Definition at line 83 of file nvram.c.
References NULL, nvram_tuples, nvramHash(), and OK.
Referenced by nvramInit().


1.5.5