1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 18:17:32 +02:00

[backfire] merge r21288

git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21289 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-05-02 00:45:51 +00:00
parent 4b7df982c5
commit e49cd53e15
2 changed files with 26 additions and 14 deletions

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nvram
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

View File

@ -165,20 +165,32 @@ int main( int argc, const char *argv[] )
stat = do_info(nvram);
done++;
}
else if( !strcmp(argv[i], "get") && ++i < argc )
else if( !strcmp(argv[i], "get") || !strcmp(argv[i], "unset") || !strcmp(argv[i], "set") )
{
if( (i+1) < argc )
{
switch(argv[i++][0])
{
case 'g':
stat = do_get(nvram, argv[i]);
done++;
}
else if( !strcmp(argv[i], "unset") && ++i < argc )
{
break;
case 'u':
stat = do_unset(nvram, argv[i]);
break;
case 's':
stat = do_set(nvram, argv[i]);
break;
}
done++;
}
else if( !strcmp(argv[i], "set") && ++i < argc )
else
{
stat = do_set(nvram, argv[i]);
done++;
fprintf(stderr, "Command '%s' requires an argument!\n", argv[i]);
done = 0;
break;
}
}
else if( !strcmp(argv[i], "commit") )
{