1. Alessio Caiazza
  2. gsconf

Commits

Alessio Caiazza  committed 4dc0297

FIX: minor help fixes

help should work also when no device are selected
duplicated label in vlan help

  • Participants
  • Parent commits 5e3990d
  • Branches master

Comments (0)

Files changed (2)

File shell.c

View file
                 elem = split(&argv, cmd, " ");
                 
 
-                
+                if (strncmp(argv[0], "help", 4) == 0) {
+                        printf("Available commands: \n");
+                        printf("[discover|select|nodev|ip|vlan|port|sys] \n");
+                }
+
                 if (strncmp(argv[0], "discover", 8) == 0) {
                         n = gs105e_discover();
                         printf("Discovered \033[92m%i\033[0m devices\n", n);
                 if (strncmp(argv[0], "sys", 3) == 0) {
                         shell_sys(argv, elem);
                 }
-                
-                if (strncmp(argv[0], "help", 4) == 0) {
-                        printf("Available commands: \n");
-                        printf("[discover|select|nodev|ip|vlan|port|sys] \n");
-                }
-
-                
-                
         }
 }
 

File shell_vlan.c

View file
         int n, m, o;
         
         if (elem == 1) {
-                printf(" vlan [show|enable|show|add|del|assign|revoke] \n");
+                printf(" vlan [enable|show|add|del|assign|revoke] \n");
                 return;
         }