int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
-unsigned int block_size = 0;
+long block_size = 0; /* "long" because popt can't set an int32. */
/** Network address family. **/
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
-int rsync_port = RSYNC_PORT;
+int rsync_port = 0;
int copy_dest = 0;
int link_dest = 0;
rprintf(F," --files-from=FILE read FILE for list of source-file names\n");
rprintf(F," -0, --from0 all *-from file lists are delimited by nulls\n");
rprintf(F," --version print version number\n");
+ rprintf(F," --port=PORT specify double-colon alternate port number\n");
rprintf(F," --blocking-io use blocking I/O for the remote shell\n");
rprintf(F," --no-blocking-io turn off --blocking-io\n");
rprintf(F," --stats give some file transfer stats\n");
{"relative", 'R', POPT_ARG_VAL, &relative_paths, 1, 0, 0 },
{"no-relative", 0, POPT_ARG_VAL, &relative_paths, 0, 0, 0 },
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
- {"block-size", 'B', POPT_ARG_INT, &block_size, 0, 0, 0 },
+ {"block-size", 'B', POPT_ARG_LONG, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
{"max-size", 0, POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"blocking-io", 0, POPT_ARG_VAL, &blocking_io, 1, 0, 0 },
{"no-blocking-io", 0, POPT_ARG_VAL, &blocking_io, 0, 0, 0 },
{0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 },
+ {"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 },
{"log-format", 0, POPT_ARG_STRING, &log_format, 0, 0, 0 },
{"bwlimit", 0, POPT_ARG_INT, &bwlimit, 0, 0, 0 },
{"backup-dir", 0, POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
{"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
{"no-detach", 0, POPT_ARG_NONE, 0, OPT_DAEMON, 0, 0 },
- {"port", 0, POPT_ARG_INT, 0, OPT_DAEMON, 0, 0 },
{0,0,0,0, 0, 0, 0}
};
args[ac++] = argstr;
if (block_size) {
- if (asprintf(&arg, "-B%u", block_size) < 0)
+ if (asprintf(&arg, "-B%lu", block_size) < 0)
goto oom;
args[ac++] = arg;
}
args[ac++] = "--files-from=-";
args[ac++] = "--from0";
}
+ if (!relative_paths)
+ args[ac++] = "--no-relative";
}
*argc = ac;