add "swconfig list" support

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36282
This commit is contained in:
John Crispin
2013-04-09 14:19:05 +00:00
parent f90f025f20
commit f13ae9965c
3 changed files with 41 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ show_vlan(struct switch_dev *dev, int vlan, bool all)
static void
print_usage(void)
{
printf("swconfig list\n");
printf("swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>|load <config>|show)\n");
exit(1);
}
@@ -214,6 +215,11 @@ int main(int argc, char **argv)
char *ckey = NULL;
char *cvalue = NULL;
if((argc == 2) && !strcmp(argv[1], "list")) {
swlib_list();
return 0;
}
if(argc < 4)
print_usage();