]> git.sur5r.net Git - ngadmin/blobdiff - cli/com_list.c
Let commands handle themselves absence of arguments
[ngadmin] / cli / com_list.c
index 820d6989ec00e2c2b2679a8638611ae5b57b3e3c..064690cde700eebe8010b8f47592c5c6d6ebc883 100644 (file)
@@ -2,11 +2,17 @@
 #include "commands.h"
 
 
-bool do_list (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
+bool do_list (int argc, const char **argv UNUSED, struct ngadmin *nga)
 {
        int n;
        const struct swi_attr *sa;
        
+       
+       if (argc > 0) {
+               printf("this command takes no argument\n");
+               return false;
+       }
+       
        sa = ngadmin_getSwitchTab(nga, &n);
        displaySwitchTab(sa, n);