static nvram_handle_t * nvram_open_staging(void) { if( nvram_find_staging() != NULL || nvram_to_staging() == 0 ) return nvram_open(NVRAM_STAGING, NVRAM_RW); return NULL; }
static nvram_handle_t * _lib_nvram_open_rdonly(void) { const char *file = nvram_find_staging(); if(!(file!=NULL)) file=nvram_find_mtd(); if( file != NULL ) return _nvram_open(file, NVRAM_RO); return NULL; }