struct cmdline_parser_params params = {
.override = override,
.initialize = 0,
- .check_required = 0,
+ .check_required = 1,
.check_ambiguity = 0
};
cmdline_parser_config_file(config_file, &conf, ¶ms);
}
- if (!conf.source_dir_given || !conf.dest_dir_given) {
- ret = -E_SYNTAX;
- make_err_msg("you need to specify both source_dir and dest_dir");
- goto out;
- }
ret = check_config();
if (ret < 0)
goto out;
int main(int argc, char **argv)
{
int ret;
+ struct cmdline_parser_params params = {
+ .override = 0,
+ .initialize = 1,
+ .check_required = 0,
+ .check_ambiguity = 0
+ };
- cmdline_parser(argc, argv, &conf); /* aborts on errors */
+ cmdline_parser_ext(argc, argv, &conf, ¶ms); /* aborts on errors */
parse_config_file(0);
if (conf.daemon_given)
daemon_init();
#~~~~~~~~~~~~~~~~~~~~
"The data directory"
string typestr="dirname"
-optional
+required
details="
The directory on the remote host from which snapshots are
taken. Of course, the user specified as --remote-user must
#~~~~~~~~~~~~~~~~~~
"Snapshot dir"
string typestr="dirname"
-optional
+required
details="
The destination directory on the local host where snapshots
will be written. This must be writable by the user who runs