/* * Stubs for NVRAM functions for platforms without flash * * Copyright (C) 2015, Broadcom Corporation. All Rights Reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: nvramstubs.c 503082 2014-09-17 06:36:56Z $ */ #if defined(__NetBSD__) #if defined(_KERNEL) #include #endif /* defined(_KERNEL) */ #endif /* defined(__NetBSD__) */ #include #include #undef strcmp #define strcmp(s1,s2) 0 /* always match */ #include int nvram_init(void *sih) { return 0; } #if defined(_CFE_) && defined(BCM_DEVINFO) int devinfo_nvram_init(void *sih) { return 0; } #endif int nvram_append(void *sb, char *vars, uint varsz) { return 0; } void nvram_exit(void *sih) { } char * nvram_get(const char *name) { return (char *) 0; } int nvram_set(const char *name, const char *value) { return 0; } int nvram_unset(const char *name) { return 0; } int nvram_commit(void) { return 0; } int nvram_getall(char *buf, int count) { /* add null string as terminator */ if (count < 1) return BCME_BUFTOOSHORT; *buf = '\0'; return 0; }