#include "commands.h"
-bool do_restart (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga UNUSED)
+int do_restart (int argc, const char **argv UNUSED, struct ngadmin *nga UNUSED)
{
- int i, ret = true;
+ int i, ret = 0;
const struct swi_attr *sa;
char line[16];
+ if (argc > 0) {
+ printf("this command takes no argument\n");
+ ret = 1;
+ goto end;
+ }
+
sa = ngadmin_getCurrentSwitch(nga);
if (sa == NULL) {
printf("must be logged\n");
- ret = false;
+ ret = 1;
goto end;
}