]> git.sur5r.net Git - ngadmin/blob - cli/com_list.c
Let commands handle themselves absence of arguments
[ngadmin] / cli / com_list.c
1
2 #include "commands.h"
3
4
5 bool do_list (int argc, const char **argv UNUSED, struct ngadmin *nga)
6 {
7         int n;
8         const struct swi_attr *sa;
9         
10         
11         if (argc > 0) {
12                 printf("this command takes no argument\n");
13                 return false;
14         }
15         
16         sa = ngadmin_getSwitchTab(nga, &n);
17         displaySwitchTab(sa, n);
18         
19         return true;
20 }
21
22