Before compiling, be sure to run "make proto".
---- orig/generator.c 2004-11-03 20:30:45
+--- orig/generator.c 2004-11-11 22:13:09
+++ generator.c 2004-11-03 22:47:23
-@@ -45,7 +45,7 @@ extern int io_timeout;
+@@ -46,7 +46,7 @@ extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
extern char *partial_dir;
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -424,11 +424,19 @@ static void recv_generator(char *fname,
+@@ -429,11 +429,19 @@ static void recv_generator(char *fname,
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
#if HAVE_LINK
if (link_dest && !dry_run) {
if (do_link(fnamecmpbuf, fname) < 0) {
-@@ -439,15 +447,14 @@ static void recv_generator(char *fname,
+@@ -444,15 +452,14 @@ static void recv_generator(char *fname,
safe_fname(fname));
}
fnamecmp = fnamecmpbuf;
/* The receiving side mustn't obey this, or an existing symlink that
* points to an identical file won't be replaced by the referent. */
---- orig/options.c 2004-10-14 17:11:40
-+++ options.c 2004-10-14 17:13:57
-@@ -114,12 +114,13 @@ int write_batch = 0;
+--- orig/options.c 2004-11-11 22:13:09
++++ options.c 2004-11-11 22:14:34
+@@ -115,12 +115,13 @@ int write_batch = 0;
int read_batch = 0;
int backup_dir_len = 0;
int backup_suffix_len;
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
-@@ -140,6 +141,7 @@ char *batch_name = NULL;
+@@ -141,6 +142,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
+static int saw_compare_dest = 0;
+ static char *max_size_arg;
/** Local address to bind. As a character string because it's
- * interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -310,7 +312,7 @@ void usage(enum logcode F)
+@@ -313,7 +315,7 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
- OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
+ OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_COMPARE_DEST, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
OPT_REFUSED_BASE = 9000};
-@@ -369,8 +371,8 @@ static struct poptOption long_options[]
- {"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
+@@ -373,8 +375,8 @@ static struct poptOption long_options[]
+ {"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 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
- {"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
-@@ -672,8 +674,28 @@ int parse_arguments(int *argc, const cha
+@@ -705,8 +707,28 @@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
link_dest = 1;
break;
#else
-@@ -765,6 +787,11 @@ int parse_arguments(int *argc, const cha
+@@ -798,6 +820,11 @@ int parse_arguments(int *argc, const cha
return 0;
}
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -792,8 +819,6 @@ int parse_arguments(int *argc, const cha
+@@ -825,8 +852,6 @@ int parse_arguments(int *argc, const cha
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0);
if (partial_dir)
partial_dir = sanitize_path(NULL, partial_dir, NULL, 0);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
if (files_from)
-@@ -801,6 +826,7 @@ int parse_arguments(int *argc, const cha
+@@ -834,6 +859,7 @@ int parse_arguments(int *argc, const cha
}
if (server_exclude_list.head && !am_sender) {
struct exclude_list_struct *elp = &server_exclude_list;
if (tmpdir) {
clean_fname(tmpdir, 1);
if (check_exclude(elp, tmpdir, 1) < 0)
-@@ -811,9 +837,9 @@ int parse_arguments(int *argc, const cha
+@@ -844,9 +870,9 @@ int parse_arguments(int *argc, const cha
if (check_exclude(elp, partial_dir, 1) < 0)
goto options_rejected;
}
goto options_rejected;
}
if (backup_dir) {
-@@ -884,7 +910,7 @@ int parse_arguments(int *argc, const cha
+@@ -917,7 +943,7 @@ int parse_arguments(int *argc, const cha
am_server ? "server" : "client");
return 0;
#endif
snprintf(err_buf, sizeof err_buf,
"--inplace does not yet work with %s\n",
link_dest ? "--link-dest" : "--compare-dest");
-@@ -951,8 +977,8 @@ int parse_arguments(int *argc, const cha
+@@ -984,8 +1010,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
char *arg;
int i, x;
-@@ -1135,13 +1161,16 @@ void server_options(char **args,int *arg
+@@ -1173,13 +1199,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2004-09-20 19:50:13
-+++ generator.c 2004-07-03 20:16:51
-@@ -41,6 +41,7 @@ extern int make_backups;
+--- orig/generator.c 2004-11-11 22:13:09
++++ generator.c 2004-11-11 22:15:27
+@@ -40,6 +40,7 @@ extern int inplace;
+ extern int make_backups;
extern int csum_length;
extern int ignore_times;
- extern int size_only;
+extern int date_only;
+ extern int size_only;
+ extern OFF_T max_size;
extern int io_timeout;
- extern int protocol_version;
- extern int always_checksum;
-@@ -62,6 +63,8 @@ extern struct exclude_list_struct server
+@@ -63,6 +64,8 @@ extern struct exclude_list_struct server
/* choose whether to skip a particular file */
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
{
if (st->st_size != file->length)
return 0;
if (link_dest) {
---- orig/options.c 2004-09-23 17:42:07
+--- orig/options.c 2004-11-11 22:13:09
+++ options.c 2004-07-03 20:16:51
@@ -84,6 +84,7 @@ int keep_partial = 0;
int safe_symlinks = 0;
int bwlimit = 0;
size_t bwlimit_writemax = 0;
int delete_after = 0;
-@@ -275,6 +276,7 @@ void usage(enum logcode F)
+@@ -278,6 +279,7 @@ void usage(enum logcode F)
rprintf(F," --timeout=TIME set I/O timeout in seconds\n");
rprintf(F," -I, --ignore-times turn off mod time & file size quick check\n");
rprintf(F," --size-only ignore mod time for quick check (use size)\n");
rprintf(F," --modify-window=NUM compare mod times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
-@@ -330,6 +332,7 @@ static struct poptOption long_options[]
+@@ -326,6 +328,7 @@ static struct poptOption long_options[]
{"password-file", 0, POPT_ARG_STRING, &password_file, 0, 0, 0 },
{"ignore-times", 'I', POPT_ARG_NONE, &ignore_times, 0, 0, 0 },
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, &one_file_system, 0, 0, 0 },
{"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 },
-@@ -1034,6 +1037,9 @@ void server_options(char **args,int *arg
+@@ -1129,6 +1132,9 @@ void server_options(char **args,int *arg
if (size_only)
args[ac++] = "--size-only";
if (modify_window_set) {
if (asprintf(&arg, "--modify-window=%d", modify_window) < 0)
goto oom;
---- orig/rsync.yo 2004-09-24 16:42:30
+--- orig/rsync.yo 2004-11-11 22:13:11
+++ rsync.yo 2004-07-03 20:16:51
-@@ -352,6 +352,7 @@ verb(
+@@ -353,6 +353,7 @@ verb(
--timeout=TIME set I/O timeout in seconds
-I, --ignore-times turn off mod time & file size quick check
--size-only ignore mod time for quick check (use size)
--modify-window=NUM compare mod times with reduced accuracy
-T --temp-dir=DIR create temporary files in directory DIR
--compare-dest=DIR also compare received files relative to DIR
-@@ -426,6 +427,12 @@ regardless of timestamp. This is useful
+@@ -427,6 +428,12 @@ regardless of timestamp. This is useful
after using another mirroring system which may not preserve timestamps
exactly.
the file's name.
---- orig/Makefile.in 2004-10-14 17:11:40
+--- orig/Makefile.in 2004-11-03 11:56:03
+++ Makefile.in 2004-07-03 20:20:15
@@ -35,7 +35,7 @@ OBJS1=rsync.o generator.o receiver.o cle
main.o checksum.o match.o syscall.o log.o backup.o
+}
+
+#endif
---- orig/options.c 2004-10-14 17:11:40
+--- orig/options.c 2004-11-11 22:13:09
+++ options.c 2004-10-14 17:24:21
-@@ -126,6 +126,7 @@ char *log_format = NULL;
+@@ -127,6 +127,7 @@ char *log_format = NULL;
char *password_file = NULL;
char *rsync_path = RSYNC_PATH;
char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
-@@ -279,6 +280,7 @@ void usage(enum logcode F)
+@@ -282,6 +283,7 @@ void usage(enum logcode F)
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n");
rprintf(F," -P equivalent to --partial --progress\n");
rprintf(F," -z, --compress compress file data\n");
rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n");
-@@ -312,7 +314,7 @@ void usage(enum logcode F)
+@@ -315,7 +317,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
-- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
-+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_LINK_BY_HASH,
+- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
++ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, OPT_LINK_BY_HASH,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -371,6 +373,7 @@ static struct poptOption long_options[]
+@@ -375,6 +377,7 @@ static struct poptOption long_options[]
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, &compare_dest, 0, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, &compare_dest, OPT_LINK_DEST, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"stats", 0, POPT_ARG_NONE, &do_stats, 0, 0, 0 },
-@@ -683,6 +686,21 @@ int parse_arguments(int *argc, const cha
+@@ -716,6 +719,21 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -1144,6 +1162,11 @@ void server_options(char **args,int *arg
+@@ -1182,6 +1200,11 @@ void server_options(char **args,int *arg
args[ac++] = compare_dest;
}
if (files_from && (!am_sender || remote_filesfrom_file)) {
if (remote_filesfrom_file) {
args[ac++] = "--files-from";
---- orig/receiver.c 2004-09-21 09:40:27
+--- orig/receiver.c 2004-11-03 20:30:45
+++ receiver.c 2004-07-20 21:44:05
-@@ -39,6 +39,7 @@ extern int io_error;
+@@ -40,6 +40,7 @@ extern int io_error;
extern char *tmpdir;
extern char *partial_dir;
extern char *compare_dest;
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
-@@ -202,12 +203,13 @@ static int get_tmpname(char *fnametmp, c
+@@ -203,12 +204,13 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -227,6 +229,9 @@ static int receive_data(int f_in, char *
+@@ -228,6 +230,9 @@ static int receive_data(int f_in, char *
} else
mapbuf = NULL;
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
-@@ -243,6 +248,8 @@ static int receive_data(int f_in, char *
+@@ -244,6 +249,8 @@ static int receive_data(int f_in, char *
cleanup_got_literal = 1;
sum_update(data,i);
if (fd != -1 && write_file(fd,data,i) != i)
goto report_write_error;
-@@ -267,6 +274,8 @@ static int receive_data(int f_in, char *
+@@ -268,6 +275,8 @@ static int receive_data(int f_in, char *
see_token(map, len);
sum_update(map,len);
}
if (inplace) {
-@@ -306,6 +315,8 @@ static int receive_data(int f_in, char *
+@@ -307,6 +316,8 @@ static int receive_data(int f_in, char *
}
sum_end(file_sum1);
if (mapbuf)
unmap_file(mapbuf);
-@@ -321,7 +332,7 @@ static int receive_data(int f_in, char *
+@@ -322,7 +333,7 @@ static int receive_data(int f_in, char *
static void discard_receive_data(int f_in, OFF_T length)
{
}
-@@ -542,8 +553,12 @@ int recv_files(int f_in, struct file_lis
+@@ -549,8 +560,12 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", safe_fname(fname));
/* recv file data */
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
ret == -2 ? "copy" : "rename",
---- orig/rsync.h 2004-10-09 03:21:56
+--- orig/rsync.h 2004-11-03 20:30:45
+++ rsync.h 2004-07-03 20:20:15
-@@ -529,6 +529,14 @@ struct stats {
+@@ -534,6 +534,14 @@ struct stats {
int current_file_index;
};
can't say if I've left any cleanup/compatibility errors in the code.
---- orig/Makefile.in 2004-10-14 17:11:40
+--- orig/Makefile.in 2004-11-03 11:56:03
+++ Makefile.in 2004-10-08 20:17:06
@@ -39,7 +39,7 @@ OBJS3=progress.o pipe.o
DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o
-OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@
+OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) $(ZLIBOBJ) @BUILD_POPT@ @SSL_OBJS@
- TLS_OBJ = tls.o syscall.o lib/compat.o lib/permstring.o
+ TLS_OBJ = tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o
--- orig/cleanup.c 2004-10-14 17:11:40
+++ cleanup.c 2004-07-03 20:22:28
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
---- orig/main.c 2004-10-08 20:16:26
+--- orig/main.c 2004-11-03 20:30:45
+++ main.c 2004-10-08 20:15:28
@@ -56,6 +56,9 @@ extern int write_batch;
extern int batch_fd;
extern pid_t cleanup_child_pid;
extern char *files_from;
extern char *remote_filesfrom_file;
-@@ -777,33 +780,48 @@ static int start_client(int argc, char *
+@@ -790,33 +793,48 @@ static int start_client(int argc, char *
if ((rc = copy_argv(argv)))
return rc;
p = find_colon(argv[0]);
if (p) { /* source is remote */
if (remote_filesfrom_file
-@@ -835,12 +853,26 @@ static int start_client(int argc, char *
+@@ -848,12 +866,26 @@ static int start_client(int argc, char *
argv++;
} else { /* source is local */
am_sender = 1;
p = strchr(host,'/');
if (p) {
*p = '\0';
---- orig/options.c 2004-10-14 17:11:40
-+++ options.c 2004-10-14 17:27:53
-@@ -135,6 +135,14 @@ int quiet = 0;
+--- orig/options.c 2004-11-11 22:13:09
++++ options.c 2004-11-11 22:21:10
+@@ -136,6 +136,14 @@ int quiet = 0;
int always_checksum = 0;
int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
-@@ -154,6 +162,7 @@ static void print_rsync_version(enum log
+@@ -156,6 +164,7 @@ static void print_rsync_version(enum log
char const *hardlinks = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
#ifdef HAVE_SOCKETPAIR
-@@ -176,6 +185,10 @@ static void print_rsync_version(enum log
+@@ -178,6 +187,10 @@ static void print_rsync_version(enum log
ipv6 = "";
#endif
rprintf(f, "%s version %s protocol version %d\n",
RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
rprintf(f,
-@@ -189,10 +202,10 @@ static void print_rsync_version(enum log
+@@ -191,10 +204,10 @@ static void print_rsync_version(enum log
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
* macros. */
#ifdef MAINTAINER_MODE
rprintf(f, " panic action: \"%s\"\n",
get_panic_action());
-@@ -302,6 +315,13 @@ void usage(enum logcode F)
+@@ -305,6 +318,13 @@ void usage(enum logcode F)
rprintf(F," -4, --ipv4 prefer IPv4\n");
rprintf(F," -6, --ipv6 prefer IPv6\n");
#endif
rprintf(F," -h, --help show this help screen\n");
rprintf(F,"\nUse \"rsync --daemon --help\" to see the daemon-mode command-line options.\n");
-@@ -312,7 +332,7 @@ void usage(enum logcode F)
+@@ -315,7 +335,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
-- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
-+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_USE_SSL,
+- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
++ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE, OPT_USE_SSL,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -396,6 +416,13 @@ static struct poptOption long_options[]
+@@ -400,6 +420,13 @@ static struct poptOption long_options[]
{"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
/* All these options switch us into daemon-mode option-parsing. */
{"address", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
{"config", 0, POPT_ARG_STRING, 0, OPT_DAEMON, 0, 0 },
-@@ -683,6 +710,12 @@ int parse_arguments(int *argc, const cha
+@@ -716,6 +743,12 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -864,6 +897,17 @@ int parse_arguments(int *argc, const cha
+@@ -897,6 +930,17 @@ int parse_arguments(int *argc, const cha
if (do_progress && !verbose)
verbose = 1;
if (bwlimit) {
bwlimit_writemax = (size_t)bwlimit * 128;
if (bwlimit_writemax < 512)
---- orig/rsync.h 2004-10-09 03:21:56
+--- orig/rsync.h 2004-11-03 20:30:45
+++ rsync.h 2004-10-08 21:01:33
@@ -32,6 +32,7 @@
#define BACKUP_SUFFIX "~"
-@@ -333,6 +334,11 @@ enum msgcode {
+@@ -338,6 +339,11 @@ enum msgcode {
#define uint64 unsigned off_t
#endif
make proto
---- orig/io.c 2004-08-02 02:44:26
+--- orig/io.c 2004-11-03 20:30:45
+++ io.c 2004-07-03 20:17:10
@@ -240,6 +240,14 @@ static void read_msg_fd(void)
read_loop(fd, buf, 4);
case MSG_INFO:
case MSG_ERROR:
if (remaining >= sizeof line) {
---- orig/main.c 2004-10-08 20:16:26
+--- orig/main.c 2004-11-03 20:30:45
+++ main.c 2004-08-13 08:24:23
@@ -42,6 +42,7 @@ extern int list_only;
extern int local_server;
extern int orig_umask;
extern int copy_links;
extern int keep_dirlinks;
-@@ -621,6 +622,8 @@ void start_server(int f_in, int f_out, i
+@@ -634,6 +635,8 @@ void start_server(int f_in, int f_out, i
if (am_sender) {
keep_dirlinks = 0; /* Must be disabled on the sender. */
recv_exclude_list(f_in);
if (cvs_exclude)
-@@ -702,6 +705,9 @@ int client_run(int f_in, int f_out, pid_
+@@ -715,6 +718,9 @@ int client_run(int f_in, int f_out, pid_
exit_cleanup(status);
}
if (argc == 0)
list_only = 1;
---- orig/options.c 2004-10-14 17:11:40
+--- orig/options.c 2004-11-11 22:13:09
+++ options.c 2004-10-14 17:17:53
@@ -87,8 +87,10 @@ int size_only = 0;
int bwlimit = 0;
int opt_ignore_existing = 0;
+int need_messages_from_generator = 0;
int max_delete = 0;
+ OFF_T max_size = 0;
int ignore_errors = 0;
- int modify_window = 0;
-@@ -266,6 +268,7 @@ void usage(enum logcode F)
+@@ -268,6 +270,7 @@ void usage(enum logcode F)
rprintf(F," --delete delete files that don't exist on the sending side\n");
rprintf(F," --delete-excluded also delete excluded files on the receiving side\n");
rprintf(F," --delete-after receiver deletes after transferring, not before\n");
+ rprintf(F," --delete-sent-files updated/sent files are removed from sending side\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
- rprintf(F," --partial keep partially transferred files\n");
-@@ -310,8 +313,8 @@ void usage(enum logcode F)
+ rprintf(F," --max-size=SIZE don't transfer any file larger than SIZE\n");
+@@ -313,8 +316,8 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
- OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
+ OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_DELETE_SENT_FILES,
+ OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_LINK_DEST, OPT_MODIFY_WINDOW,
- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
OPT_REFUSED_BASE = 9000};
-@@ -330,6 +333,7 @@ static struct poptOption long_options[]
+@@ -333,6 +336,7 @@ static struct poptOption long_options[]
{"ignore-existing", 0, POPT_ARG_NONE, &opt_ignore_existing, 0, 0, 0 },
{"delete-after", 0, POPT_ARG_NONE, 0, OPT_DELETE_AFTER, 0, 0 },
{"delete-excluded", 0, POPT_ARG_NONE, 0, OPT_DELETE_EXCLUDED, 0, 0 },
{"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 },
{"numeric-ids", 0, POPT_ARG_NONE, &numeric_ids, 0, 0, 0 },
{"exclude", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE, 0, 0 },
-@@ -606,6 +610,11 @@ int parse_arguments(int *argc, const cha
+@@ -610,6 +614,11 @@ int parse_arguments(int *argc, const cha
delete_mode = 1;
break;
case OPT_EXCLUDE:
add_exclude(&exclude_list, poptGetOptArg(pc), 0);
break;
-@@ -1156,6 +1165,9 @@ void server_options(char **args,int *arg
+@@ -1194,6 +1203,9 @@ void server_options(char **args,int *arg
}
}
*argc = ac;
return;
---- orig/receiver.c 2004-09-21 09:40:27
+--- orig/receiver.c 2004-11-03 20:30:45
+++ receiver.c 2004-08-13 08:38:51
-@@ -45,6 +45,7 @@ extern char *backup_dir;
+@@ -46,6 +46,7 @@ extern char *backup_dir;
extern char *backup_suffix;
extern int backup_suffix_len;
extern int cleanup_got_literal;
extern int module_id;
extern int ignore_errors;
extern int orig_umask;
-@@ -337,7 +338,7 @@ int recv_files(int f_in, struct file_lis
+@@ -339,7 +340,7 @@ int recv_files(int f_in, struct file_lis
char *fname, fbuf[MAXPATHLEN];
char template[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char fnamecmpbuf[MAXPATHLEN];
struct file_struct *file;
struct stats initial_stats;
-@@ -572,7 +573,12 @@ int recv_files(int f_in, struct file_lis
+@@ -579,7 +580,12 @@ int recv_files(int f_in, struct file_lis
cleanup_disable();
int msgtype = csum_length == SUM_LENGTH || read_batch ?
FERROR : FINFO;
if (msgtype == FERROR || verbose) {
-@@ -596,9 +602,8 @@ int recv_files(int f_in, struct file_lis
+@@ -603,9 +609,8 @@ int recv_files(int f_in, struct file_lis
keptstr, redostr);
}
if (csum_length != SUM_LENGTH) {
}
}
}
---- orig/rsync.h 2004-10-09 03:21:56
+--- orig/rsync.h 2004-11-03 20:30:45
+++ rsync.h 2004-07-03 20:17:10
@@ -60,6 +60,7 @@
#define FLAG_TOP_DIR (1<<0)
/* update this if you make incompatible changes */
#define PROTOCOL_VERSION 28
-@@ -127,6 +128,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3
+@@ -132,6 +133,7 @@ enum logcode { FERROR=1, FINFO=2, FLOG=3
/* Messages types that are sent over the message channel. The logcode
* values must all be present here with identical numbers. */
enum msgcode {
MSG_DONE=5, /* current phase is done */
MSG_REDO=4, /* reprocess indicated flist index */
MSG_ERROR=FERROR, MSG_INFO=FINFO, MSG_LOG=FLOG, /* remote logging */
---- orig/rsync.yo 2004-10-06 00:12:16
+--- orig/rsync.yo 2004-11-11 22:13:11
+++ rsync.yo 2004-07-03 20:17:10
@@ -343,6 +343,7 @@ verb(
--delete delete files that don't exist on sender
+ --delete-sent-files updated/sent files are removed from sender
--ignore-errors delete even if there are I/O errors
--max-delete=NUM don't delete more than NUM files
- --partial keep partially transferred files
-@@ -661,6 +662,11 @@ receiving side before transferring files
+ --max-size=SIZE don't transfer any file larger than SIZE
+@@ -667,6 +668,11 @@ receiving side before transferring files
sufficient space on the receiving filesystem. If you want to delete
after transferring, use the --delete-after switch. Implies --delete.
Do we need configure support for mktime()?
---- orig/io.c 2004-08-02 02:44:26
+--- orig/io.c 2004-11-03 20:30:45
+++ io.c 2004-07-17 15:28:36
@@ -49,6 +49,7 @@ extern int am_sender;
extern int eol_nulls;
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds - exiting\n",
(int)(t-last_io));
---- orig/options.c 2004-10-14 17:11:40
-+++ options.c 2004-10-14 17:29:34
-@@ -96,6 +96,7 @@ int blocking_io = -1;
+--- orig/options.c 2004-11-11 22:13:09
++++ options.c 2004-11-11 22:22:25
+@@ -97,6 +97,7 @@ int blocking_io = -1;
int checksum_seed = 0;
int inplace = 0;
unsigned int block_size = 0;
/** Network address family. **/
-@@ -296,6 +297,8 @@ void usage(enum logcode F)
+@@ -299,6 +300,8 @@ void usage(enum logcode F)
rprintf(F," --log-format=FORMAT log file transfers using specified format\n");
rprintf(F," --password-file=FILE get password from FILE\n");
rprintf(F," --bwlimit=KBPS limit I/O bandwidth, KBytes per second\n");
rprintf(F," --write-batch=FILE write a batch to FILE\n");
rprintf(F," --read-batch=FILE read a batch from FILE\n");
#ifdef INET6
-@@ -313,6 +316,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -316,6 +319,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
- OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
+ OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
+ OPT_STOP_AT, OPT_TIME_LIMIT,
OPT_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -383,6 +387,8 @@ static struct poptOption long_options[]
+@@ -387,6 +391,8 @@ static struct poptOption long_options[]
{0, 'P', POPT_ARG_NONE, 0, 'P', 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 },
{"hard-links", 'H', POPT_ARG_NONE, &preserve_hard_links, 0, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
-@@ -683,6 +689,36 @@ int parse_arguments(int *argc, const cha
+@@ -716,6 +722,36 @@ int parse_arguments(int *argc, const cha
return 0;
#endif
default:
/* A large opt value means that set_refuse_options()
* turned this option off (opt-BASE is its index). */
-@@ -1062,6 +1098,15 @@ void server_options(char **args,int *arg
+@@ -1100,6 +1136,15 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (backup_dir) {
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
---- orig/rsync.yo 2004-10-06 00:12:16
+--- orig/rsync.yo 2004-11-11 22:13:11
+++ rsync.yo 2004-07-15 02:44:40
-@@ -378,6 +378,8 @@ verb(
+@@ -379,6 +379,8 @@ verb(
--log-format=FORMAT log file transfers using specified format
--password-file=FILE get password from FILE
--bwlimit=KBPS limit I/O bandwidth, KBytes per second
--write-batch=FILE write a batch to FILE
--read-batch=FILE read a batch from FILE
--checksum-seed=NUM set block/file checksum seed
-@@ -1001,6 +1003,19 @@ transfer was too fast, it will wait befo
+@@ -1007,6 +1009,19 @@ transfer was too fast, it will wait befo
result is an average transfer rate equaling the specified limit. A value
of zero specifies no limit.