]> git.sur5r.net Git - ngadmin/blob - cli/com_login.c
Code reorganized.
[ngadmin] / cli / com_login.c
1
2 #include "common.h"
3
4
5
6
7 static bool do_login (const struct TreeNode *tn UNUSED, int nb, const char **com, struct ngadmin *nga) {
8  
9  int i;
10  
11  
12  if ( nb!=1 ) {
13   printf("Usage: login <num>\n");
14   return false;
15  }
16  
17  
18  i=strtol(com[0], NULL, 0);
19  i=ngadmin_login(nga, i);
20  printErrCode(i);
21  
22  
23  return true;
24  
25 }
26
27
28
29 const struct TreeNode com_login=COM("login", do_login, true, NULL);
30
31
32