X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cli%2Fcom_quit.c;h=f27620bb2008b5e0709b39822c54e9b255c76b24;hb=1190a89a1fed1a7a589880fc46952f5732ad77d3;hp=61dc5ce263e81b773e2d63abf6c780b7a39cee5c;hpb=192ea617675b35fe37460a0fbb0c1511c0074fe8;p=ngadmin diff --git a/cli/com_quit.c b/cli/com_quit.c index 61dc5ce..f27620b 100644 --- a/cli/com_quit.c +++ b/cli/com_quit.c @@ -1,20 +1,17 @@ -#include "common.h" - - - - -static bool do_quit (const struct TreeNode *tn UNUSED, int nb UNUSED, const char **com UNUSED, struct ngadmin *nga UNUSED) { - - cont=0; - - return true; - +#include "commands.h" + + +int do_quit (int argc, const char **argv UNUSED, struct ngadmin *nga UNUSED) +{ + if (argc > 0) { + printf("this command takes no argument\n"); + return 1; + } + + main_loop_continue = 0; + + return 0; } - -const struct TreeNode com_quit=COM("quit", do_quit, false, NULL); - - -