]> git.sur5r.net Git - ngadmin/blob - cli/com_scan.c
Cli: refactor, change coding style
[ngadmin] / cli / com_scan.c
1
2 #include "commands.h"
3
4
5 bool do_scan (int nb UNUSED, const char **com UNUSED, struct ngadmin *nga)
6 {
7         int i;
8         const struct swi_attr *sa;
9         
10         
11         i = ngadmin_scan(nga);
12         if (i < 0) {
13                 printErrCode(i);
14                 return false;
15         }
16         
17         sa = ngadmin_getSwitchTab(nga, &nb);
18         displaySwitchTab(sa, nb);
19         
20         
21         return true;
22 }
23
24