#include "rsync.h"
#include "popt.h"
+extern int module_id;
extern int sanitize_paths;
extern int select_timeout;
extern struct filter_list_struct filter_list;
int numeric_ids = 0;
int force_delete = 0;
int io_timeout = 0;
-int read_only = 0;
-int module_id = -1;
int am_server = 0;
int am_sender = 0;
int am_generator = 0;
/** Network address family. **/
-#ifdef INET6
+#if INET6
int default_af_hint = 0; /* Any protocol */
#else
int default_af_hint = AF_INET; /* Must use IPv4 */
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-#ifdef HAVE_SOCKETPAIR
+#if HAVE_SOCKETPAIR
got_socketpair = "";
#endif
rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n");
rprintf(F," --write-batch=FILE write a batched update to FILE\n");
rprintf(F," --read-batch=FILE read a batched update from FILE\n");
-#ifdef INET6
+#if INET6
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
#endif
{"no-implied-dirs", 0, POPT_ARG_VAL, &implied_dirs, 0, 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 },
-#ifdef INET6
+#if INET6
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
#endif
rprintf(F," --config=FILE specify alternate rsyncd.conf file\n");
rprintf(F," --no-detach do not detach from the parent\n");
rprintf(F," --port=PORT listen on alternate port number\n");
-#ifdef INET6
+ rprintf(F," -v, --verbose increase verbosity\n");
+#if INET6
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
#endif
{"bwlimit", 0, POPT_ARG_INT, &daemon_bwlimit, 0, 0, 0 },
{"config", 0, POPT_ARG_STRING, &config_file, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-#ifdef INET6
+#if INET6
{"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 },
{"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 },
#endif
{"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 },
{"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 },
{"server", 0, POPT_ARG_NONE, &am_server, 0, 0, 0 },
+ {"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{0,0,0,0, 0, 0, 0}
};
daemon_usage(FINFO);
exit_cleanup(0);
+ case 'v':
+ verbose++;
+ break;
+
default:
rprintf(FERROR,
"rsync: %s: %s (in daemon mode)\n",
break;
case OPT_MAX_SIZE:
- for (arg = max_size_arg; isdigit(*arg); arg++) {}
+ for (arg = max_size_arg; isdigit(*(uchar*)arg); arg++) {}
if (*arg == '.')
- for (arg++; isdigit(*arg); arg++) {}
+ for (arg++; isdigit(*(uchar*)arg); arg++) {}
switch (*arg) {
case 'k': case 'K':
max_size = atof(max_size_arg) * 1024;
if (copy_links)
argstr[x++] = 'L';
if (xfer_dirs > 1)
- argstr[x++] = 'k';
+ argstr[x++] = 'd';
if (keep_dirlinks && am_sender)
argstr[x++] = 'K';