示例#1
0
文件: cli.c 项目: 4pao/openwrt
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;
}
示例#2
0
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;
}