From fc05980bb8acaeedeba0c90cf3afa6c248ad7eeb Mon Sep 17 00:00:00 2001 From: "advielsack@gmail.com" Date: Thu, 12 Jul 2012 18:09:06 +0000 Subject: [PATCH] committing patch for more help text from Lars Lindholm (larlin) git-svn-id: http://gsconf.googlecode.com/svn/trunk@8 11042eb7-4a36-49e9-8ab2-01d26d512705 --- gs105e.c | 6 +++--- shell.c | 4 ++++ shell_port.c | 2 +- shell_sys.c | 2 +- shell_vlan.c | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gs105e.c b/gs105e.c index 5f3ed44..f28c110 100644 --- a/gs105e.c +++ b/gs105e.c @@ -241,10 +241,10 @@ int gs105e__receive(void) { unsigned int slLen; - if (len > 0) - hexDump(data, len); +// if (len > 0) +// hexDump(data, len); if (len == -1) { - printf("Received No or Invalid Packet\n"); +// printf("Received No or Invalid Packet\n"); return -1; } if (memcmp(&data[8], myMac, 6) | data[0] != 0x01 | (!(data[1] == 0x02 | data[1] == 0x04))) { diff --git a/shell.c b/shell.c index da91eb9..744db98 100644 --- a/shell.c +++ b/shell.c @@ -220,6 +220,10 @@ int shell (void) { shell_sys(argv, elem); } + if (strncmp(argv[0], "help", 4) == 0) { + printf("Available commands: \n"); + printf("[discover|select|nodev|ip|vlan|port|sys] \n"); + } diff --git a/shell_port.c b/shell_port.c index d940029..2dbf94e 100644 --- a/shell_port.c +++ b/shell_port.c @@ -5,7 +5,7 @@ void shell_port(char ** argv, int elem) { int n, i, m, o; if (elem == 1) { - + printf(" port [show|diag|mirror] \n"); return; } if (strncmp(argv[1], "show", 4) == 0) { diff --git a/shell_sys.c b/shell_sys.c index c72b8f5..d563670 100644 --- a/shell_sys.c +++ b/shell_sys.c @@ -6,7 +6,7 @@ void shell_sys(char ** argv, int elem) { int n, i, m, o; if (elem == 1) { - printf("\n"); + printf(" port [show|name|password|restart] \n"); return; } diff --git a/shell_vlan.c b/shell_vlan.c index 85bb276..adfa969 100644 --- a/shell_vlan.c +++ b/shell_vlan.c @@ -5,7 +5,7 @@ void shell_vlan(char ** argv, int elem) { int n, m, o; if (elem == 1) { - + printf(" port [show|enable|show|add|del|assign|revoke] \n"); return; } -- 2.39.5