51 #include <libidav/xml.h> |
51 #include <libidav/xml.h> |
52 #include "config.h" |
52 #include "config.h" |
53 #include "error.h" |
53 #include "error.h" |
54 #include "assistant.h" |
54 #include "assistant.h" |
55 #include "system.h" |
55 #include "system.h" |
56 #include "pwd.h" |
|
57 #include "finfo.h" |
56 #include "finfo.h" |
58 #include "main.h" |
57 #include "main.h" |
|
58 #include "connect.h" |
59 |
59 |
60 static DavContext *ctx; |
60 static DavContext *ctx; |
61 |
61 |
62 static int printxmlerror = 1; |
62 static int printxmlerror = 1; |
63 static void xmlerrorfnc(void * c, const char * msg, ... ) { |
63 static void xmlerrorfnc(void * c, const char * msg, ... ) { |
136 char *cmd = argv[1]; |
136 char *cmd = argv[1]; |
137 CmdArgs *args = cmd_parse_args(argc - 2, argv + 2); |
137 CmdArgs *args = cmd_parse_args(argc - 2, argv + 2); |
138 if(!args) { |
138 if(!args) { |
139 print_usage(argv[0]); |
139 print_usage(argv[0]); |
140 return -1; |
140 return -1; |
|
141 } |
|
142 if(cmd_getoption(args, "noinput")) { |
|
143 pwdstore_set_pwinput_func(NULL, NULL); |
141 } |
144 } |
142 |
145 |
143 sys_init(); |
146 sys_init(); |
144 xmlGenericErrorFunc fnc = xmlerrorfnc; |
147 xmlGenericErrorFunc fnc = xmlerrorfnc; |
145 initGenericErrorDefaultFunc(&fnc); |
148 initGenericErrorDefaultFunc(&fnc); |