diff options
author | John Crispin <john@openwrt.org> | 2013-04-09 14:19:05 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-04-09 14:19:05 +0000 |
commit | f13ae9965cd593f42f18f2e7192a27cdce7441c4 (patch) | |
tree | b04f607109389c7ce45adda6f3d4782f3af0dbdb /package/network/config/swconfig/src/cli.c | |
parent | f90f025f201ba08a01f6f8f6b03ddded44b082ac (diff) | |
download | upstream-f13ae9965cd593f42f18f2e7192a27cdce7441c4.tar.gz upstream-f13ae9965cd593f42f18f2e7192a27cdce7441c4.tar.bz2 upstream-f13ae9965cd593f42f18f2e7192a27cdce7441c4.zip |
add "swconfig list" support
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36282
Diffstat (limited to 'package/network/config/swconfig/src/cli.c')
-rw-r--r-- | package/network/config/swconfig/src/cli.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/config/swconfig/src/cli.c b/package/network/config/swconfig/src/cli.c index 9cd16abb5f..5f9e532bc0 100644 --- a/package/network/config/swconfig/src/cli.c +++ b/package/network/config/swconfig/src/cli.c @@ -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(); |