]> git.sur5r.net Git - ngadmin/blobdiff - cli/com_restart.c
Let commands handle themselves absence of arguments
[ngadmin] / cli / com_restart.c
index 9c001d1aebc249c4ec6f9389aab498e665f139ec..590ac6b0241959502230e75859e675e8f1005b49 100644 (file)
@@ -2,13 +2,19 @@
 #include "commands.h"
 
 
-bool do_restart (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga UNUSED)
+bool do_restart (int argc, const char **argv UNUSED, struct ngadmin *nga UNUSED)
 {
        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");