]> git.sur5r.net Git - ngadmin/blobdiff - cli/com_tree.c
Command functions return int instead of bool
[ngadmin] / cli / com_tree.c
index cad5d5725d2bb96bb015be06620db2112580186f..b1dadff42d840ca069e64cabda818f955df43d84 100644 (file)
@@ -20,11 +20,16 @@ static void display_node (const struct TreeNode *tn, int depth)
 }
 
 
-bool do_tree (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga UNUSED)
+int do_tree (int argc, const char **argv UNUSED, struct ngadmin *nga UNUSED)
 {
-       display_node(&coms, 0);
+       if (argc > 0) {
+               printf("this command takes no argument\n");
+               return 1;
+       }
        
-       return true;
+       display_node(&commands, 0);
+       
+       return 0;
 }