]> git.sur5r.net Git - ngadmin/blobdiff - cli/com_defaults.c
Let commands handle themselves absence of arguments
[ngadmin] / cli / com_defaults.c
index a1c7107fc7972063989ad560e7000ec0880c300c..3574e4b52b63c69fdd928d129fb48e1adf399a16 100644 (file)
@@ -2,13 +2,19 @@
 #include "commands.h"
 
 
-bool do_defaults (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
+bool do_defaults (int argc, const char **argv UNUSED, struct ngadmin *nga)
 {
        int i, ret = true;
        const struct swi_attr *sa;
        char line[16];
        
        
+       if (argc > 0) {
+               printf("this command takes no argument\n");
+               ret = false;
+               goto end;
+       }
+       
        sa = ngadmin_getCurrentSwitch(nga);
        if (sa == NULL) {
                printf("must be logged\n");