-#include "common.h"
-
-
-
-
-static bool do_list (const struct TreeNode *tn UNUSED, int nb UNUSED, const char **com UNUSED, struct ngadmin *nga) {
-
- int n;
- const struct swi_attr *sa;
-
-
- sa=ngadmin_getSwitchTab(nga, &n);
- displaySwitchTab(sa, n);
-
-
- return true;
-
+#include "commands.h"
+
+
+bool do_list (int argc, const char **argv UNUSED, struct ngadmin *nga)
+{
+ int n;
+ const struct swi_attr *sa;
+
+
+ if (argc > 0) {
+ printf("this command takes no argument\n");
+ return false;
+ }
+
+ sa = ngadmin_getSwitchTab(nga, &n);
+ displaySwitchTab(sa, n);
+
+ return true;
}
-
-const struct TreeNode com_list=COM("list", do_list, false, NULL);
-
-
-