shared ARM updates
[tomato.git] / release / src-rt-6.x.4708 / shared / nvramstubs.c
blobce6d2a250b0c74a679d31a6d31be86c4be1f416d
1 /*
2 * Stubs for NVRAM functions for platforms without flash
4 * Copyright (C) 2013, Broadcom Corporation. All Rights Reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: nvramstubs.c 401759 2013-05-13 16:08:08Z $
21 #include <bcm_cfg.h>
22 #include <typedefs.h>
23 #include <bcmutils.h>
24 #undef strcmp
25 #define strcmp(s1,s2) 0 /* always match */
26 #include <bcmnvram.h>
28 int
29 nvram_init(void *sih)
31 return 0;
34 #if defined(_CFE_) && defined(BCM_DEVINFO)
35 int
36 devinfo_nvram_init(void *sih)
38 return 0;
40 #endif
42 int
43 nvram_append(void *sb, char *vars, uint varsz)
45 return 0;
48 void
49 nvram_exit(void *sih)
53 char *
54 nvram_get(const char *name)
56 return (char *) 0;
59 int
60 nvram_set(const char *name, const char *value)
62 return 0;
65 int
66 nvram_unset(const char *name)
68 return 0;
71 int
72 nvram_commit(void)
74 return 0;
77 int
78 nvram_getall(char *buf, int count)
80 /* add null string as terminator */
81 if (count < 1)
82 return BCME_BUFTOOSHORT;
83 *buf = '\0';
84 return 0;