} else {
rprintf(FLOG, "rsync %s %s from %s (%s)\n",
am_sender ? "on" : "to",
---- orig/configure.in 2004-04-30 18:04:07
+--- orig/configure.in 2004-07-16 20:07:22
+++ configure.in 2004-07-03 20:22:18
@@ -94,6 +94,8 @@ AC_ARG_WITH(rsync-path,
[ --with-rsync-path=PATH set default --rsync-path to PATH (default: rsync)],
if (f == -1 || !am_sender)
return;
}
---- orig/receiver.c 2004-07-14 17:12:06
+--- orig/receiver.c 2004-07-16 20:07:22
+++ receiver.c 2004-07-03 20:22:18
-@@ -460,7 +460,9 @@ int recv_files(int f_in, struct file_lis
+@@ -490,7 +490,9 @@ int recv_files(int f_in, struct file_lis
recv_ok = receive_data(f_in,mapbuf,fd2,fname,file->length);
log_recv(file, &initial_stats);
if (mapbuf)
unmap_file(mapbuf);
if (fd1 != -1)
---- orig/sender.c 2004-07-15 02:21:11
+--- orig/sender.c 2004-07-16 20:07:23
+++ sender.c 2004-07-15 02:37:48
-@@ -229,6 +229,9 @@ void send_files(struct file_list *flist,
+@@ -231,6 +231,9 @@ void send_files(struct file_list *flist,
match_sums(f_out, s, mbuf, st.st_size);
log_send(file, &initial_stats);
free(file);
if (verbose > 1)
---- orig/configure.in 2004-04-30 18:04:07
+--- orig/configure.in 2004-07-16 20:07:22
+++ configure.in 2004-07-03 20:11:58
@@ -434,6 +434,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
AC_CHECK_LIB(resolv, strcasecmp)
if (f != -1) {
/* Now send the uid/gid list. This was introduced in
* protocol version 15 */
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:11:58
-@@ -324,6 +324,10 @@ static void recv_generator(char *fname,
+@@ -327,6 +327,10 @@ static void recv_generator(char *fname,
if (set_perms(fname, file, statret ? NULL : &st, 0)
&& verbose && f_out != -1)
rprintf(FINFO,"%s/\n",fname);
next;
}
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-15 16:53:42
@@ -43,6 +43,7 @@ int keep_dirlinks = 0;
int copy_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
int preserve_uid = 0;
-@@ -149,6 +150,7 @@ static void print_rsync_version(enum log
- {
+@@ -151,6 +152,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
+ char const *have_inplace = "no ";
char const *hardlinks = "no ";
+ char const *acls = "no ";
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -161,6 +163,10 @@ static void print_rsync_version(enum log
+@@ -167,6 +169,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
#if SUPPORT_LINKS
links = "";
#endif
-@@ -175,9 +181,9 @@ static void print_rsync_version(enum log
+@@ -181,9 +187,9 @@ static void print_rsync_version(enum log
"Copyright (C) 1996-2004 by Andrew Tridgell and others\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -240,6 +246,7 @@ void usage(enum logcode F)
+@@ -247,6 +253,7 @@ void usage(enum logcode F)
rprintf(F," --safe-links ignore \"unsafe\" symlinks\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -o, --owner preserve owner (root only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
-@@ -347,6 +354,7 @@ static struct poptOption long_options[]
+@@ -355,6 +362,7 @@ static struct poptOption long_options[]
{"no-whole-file", 0, POPT_ARG_VAL, &whole_file, 0, 0, 0 },
{"copy-unsafe-links", 0, POPT_ARG_NONE, ©_unsafe_links, 0, 0, 0 },
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
-@@ -593,6 +601,31 @@ int parse_arguments(int *argc, const cha
+@@ -601,6 +609,31 @@ 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). */
-@@ -832,6 +865,8 @@ void server_options(char **args,int *arg
+@@ -867,6 +900,8 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_uid)
argstr[x++] = 'o';
if (preserve_gid)
---- orig/rsync.c 2004-07-02 18:06:32
+--- orig/rsync.c 2004-07-16 20:07:23
+++ rsync.c 2004-07-03 20:11:58
-@@ -204,6 +204,14 @@ int set_perms(char *fname,struct file_st
+@@ -205,6 +205,14 @@ int set_perms(char *fname,struct file_st
}
#endif
if (verbose > 1 && flags & PERMS_REPORT) {
if (updated)
rprintf(FINFO,"%s\n",fname);
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:11:58
-@@ -538,6 +538,40 @@ static inline int flist_up(struct file_l
+@@ -540,6 +540,40 @@ static inline int flist_up(struct file_l
#include "lib/permstring.h"
#include "lib/addrinfo.h"
#include "proto.h"
/* We have replacement versions of these if they're missing. */
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:11:58
-@@ -296,6 +296,7 @@ verb(
+@@ -297,6 +297,7 @@ verb(
--safe-links ignore "unsafe" symlinks
-H, --hard-links preserve hard links
-p, --perms preserve permissions
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-@@ -527,6 +528,11 @@ source file's permissions and the umask
+@@ -539,6 +540,11 @@ source file's permissions and the umask
other files (including updated files) retain their existing permissions
(which is the same behavior as other file-copy utilities, such as cp).
file->length = st.st_size;
file->mode = st.st_mode;
file->uid = st.st_uid;
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:15:41
-@@ -98,7 +98,7 @@ static int skip_file(char *fname, struct
+@@ -99,7 +99,7 @@ static int skip_file(char *fname, struct
if (ignore_times)
return 0;
}
-@@ -468,7 +468,7 @@ static void recv_generator(char *fname,
+@@ -471,7 +471,7 @@ static void recv_generator(char *fname,
}
if (update_only && fnamecmp == fname
if (verbose > 1)
rprintf(FINFO,"%s is newer\n",fname);
return;
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:15:41
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -244,6 +245,7 @@ void usage(enum logcode F)
+@@ -251,6 +252,7 @@ void usage(enum logcode F)
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
rprintf(F," -W, --whole-file copy whole files, no incremental checks\n");
-@@ -351,6 +353,7 @@ static struct poptOption long_options[]
+@@ -359,6 +361,7 @@ static struct poptOption long_options[]
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
-@@ -840,6 +843,8 @@ void server_options(char **args,int *arg
+@@ -875,6 +878,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (preserve_perms)
argstr[x++] = 'p';
if (recurse)
---- orig/rsync.c 2004-07-02 18:06:32
+--- orig/rsync.c 2004-07-16 20:07:23
+++ rsync.c 2004-07-03 20:15:41
@@ -25,6 +25,7 @@
extern int verbose;
extern int am_root;
extern int am_sender;
extern int am_generator;
-@@ -143,17 +144,31 @@ int set_perms(char *fname,struct file_st
+@@ -144,17 +145,31 @@ int set_perms(char *fname,struct file_st
if (!preserve_times || S_ISLNK(st->st_mode)
|| (make_backups && !backup_dir && S_ISDIR(st->st_mode)))
flags |= PERMS_SKIP_MTIME;
}
change_uid = am_root && preserve_uid && st->st_uid != file->uid;
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:15:41
@@ -54,6 +54,7 @@
#define XMIT_HAS_IDEV_DATA (1<<9)
uid_t uid;
gid_t gid;
mode_t mode;
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:15:41
-@@ -300,6 +300,7 @@ verb(
+@@ -301,6 +301,7 @@ verb(
-g, --group preserve group
-D, --devices preserve devices (root only)
-t, --times preserve times
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
-@@ -552,6 +553,11 @@ cause the next transfer to behave as if
+@@ -564,6 +565,11 @@ cause the next transfer to behave as if
their checksums compared and show up in log messages even if they haven't
changed.
file->uid = st.st_uid;
file->gid = st.st_gid;
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:13:41
-@@ -124,6 +124,7 @@ char *log_format = NULL;
+@@ -125,6 +125,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;
-@@ -136,6 +137,8 @@ int list_only = 0;
+@@ -137,6 +138,8 @@ int list_only = 0;
#define MAX_BATCH_NAME_LEN 256 /* Must be less than MAXPATHLEN-13 */
char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
-@@ -244,6 +247,7 @@ void usage(enum logcode F)
+@@ -251,6 +254,7 @@ void usage(enum logcode F)
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -t, --times preserve times\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
rprintf(F," -W, --whole-file copy whole files, no incremental checks\n");
-@@ -349,6 +353,7 @@ static struct poptOption long_options[]
+@@ -357,6 +361,7 @@ static struct poptOption long_options[]
{"perms", 'p', POPT_ARG_NONE, &preserve_perms, 0, 0, 0 },
{"owner", 'o', POPT_ARG_NONE, &preserve_uid, 0, 0, 0 },
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
-@@ -729,6 +734,13 @@ int parse_arguments(int *argc, const cha
+@@ -753,6 +758,13 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
if (do_progress && !verbose)
verbose = 1;
-@@ -969,6 +981,11 @@ void server_options(char **args,int *arg
+@@ -1007,6 +1019,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/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:13:41
-@@ -300,6 +300,7 @@ verb(
+@@ -301,6 +301,7 @@ verb(
-g, --group preserve group
-D, --devices preserve devices (root only)
-t, --times preserve times
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
-@@ -552,6 +553,14 @@ cause the next transfer to behave as if
+@@ -564,6 +565,14 @@ cause the next transfer to behave as if
their checksums compared and show up in log messages even if they haven't
changed.
extern int link_dest;
extern int whole_file;
extern int local_server;
-@@ -79,13 +79,12 @@ static int skip_file(char *fname, struct
+@@ -80,13 +80,12 @@ static int skip_file(char *fname, struct
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
char fnamecmpdest[MAXPATHLEN];
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
-@@ -408,13 +407,18 @@ static void recv_generator(char *fname,
+@@ -411,13 +410,18 @@ static void recv_generator(char *fname,
fnamecmp = fname;
if (statret < 0) {
errno = saveerrno;
*fnamecmpbuf = '\0';
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 17:33:30
-@@ -117,7 +117,8 @@ unsigned int backup_dir_remainder;
+@@ -118,7 +118,8 @@ unsigned int backup_dir_remainder;
char *backup_suffix = NULL;
char *tmpdir = NULL;
char *config_file = NULL;
char *shell_cmd = NULL;
char *log_format = NULL;
-@@ -138,6 +139,7 @@ char *batch_name = NULL;
+@@ -139,6 +140,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
/** Local address to bind. As a character string because it's
* interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -307,7 +309,7 @@ void usage(enum logcode F)
+@@ -314,7 +316,7 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -365,8 +367,8 @@ static struct poptOption long_options[]
+@@ -373,8 +375,8 @@ static struct poptOption long_options[]
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
{"timeout", 0, POPT_ARG_INT, &io_timeout, OPT_TIMEOUT, 0, 0 },
{"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 },
/* TODO: Should this take an optional int giving the compression level? */
{"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -582,8 +584,36 @@ int parse_arguments(int *argc, const cha
+@@ -590,8 +592,36 @@ int parse_arguments(int *argc, const cha
select_timeout = io_timeout;
break;
link_dest = 1;
break;
#else
-@@ -660,6 +690,11 @@ int parse_arguments(int *argc, const cha
+@@ -684,6 +714,11 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
if (archive_mode) {
if (!files_from)
recurse = 1;
-@@ -688,8 +723,6 @@ int parse_arguments(int *argc, const cha
+@@ -712,8 +747,6 @@ int parse_arguments(int *argc, const cha
(*argv)[i] = alloc_sanitize_path((*argv)[i], NULL);
if (tmpdir)
tmpdir = alloc_sanitize_path(tmpdir, curr_dir);
if (backup_dir)
backup_dir = alloc_sanitize_path(backup_dir, curr_dir);
if (files_from)
-@@ -784,8 +817,8 @@ int parse_arguments(int *argc, const cha
+@@ -819,8 +852,8 @@ int parse_arguments(int *argc, const cha
**/
void server_options(char **args,int *argc)
{
char *arg;
int i, x;
-@@ -960,13 +993,16 @@ void server_options(char **args,int *arg
+@@ -998,13 +1031,16 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 17:33:30
@@ -98,6 +98,8 @@
[Patched update to have context and apply to latest CVS source.]
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:16:51
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -59,6 +60,8 @@ extern struct exclude_list_struct server
+@@ -60,6 +61,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-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ 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;
-@@ -265,6 +266,7 @@ void usage(enum logcode F)
+@@ -272,6 +273,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");
-@@ -320,6 +322,7 @@ static struct poptOption long_options[]
+@@ -327,6 +329,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 },
-@@ -916,6 +919,9 @@ void server_options(char **args,int *arg
+@@ -951,6 +954,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-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:16:51
-@@ -321,6 +321,7 @@ verb(
+@@ -322,6 +322,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
-@@ -395,6 +396,12 @@ regardless of timestamp. This is useful
+@@ -396,6 +397,12 @@ regardless of timestamp. This is useful
after using another mirroring system which may not preserve timestamps
exactly.
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:17:33
@@ -48,6 +48,7 @@ int preserve_devices = 0;
int preserve_uid = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -243,7 +244,8 @@ void usage(enum logcode F)
+@@ -250,7 +251,8 @@ void usage(enum logcode F)
rprintf(F," -o, --owner preserve owner (root only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," -D, --devices preserve devices (root only)\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
rprintf(F," -W, --whole-file copy whole files, no incremental checks\n");
-@@ -351,6 +353,7 @@ static struct poptOption long_options[]
+@@ -359,6 +361,7 @@ static struct poptOption long_options[]
{"group", 'g', POPT_ARG_NONE, &preserve_gid, 0, 0, 0 },
{"devices", 'D', POPT_ARG_NONE, &preserve_devices, 0, 0, 0 },
{"times", 't', POPT_ARG_NONE, &preserve_times, 0, 0, 0 },
{"checksum", 'c', POPT_ARG_NONE, &always_checksum, 0, 0, 0 },
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"quiet", 'q', POPT_ARG_NONE, 0, 'q', 0, 0 },
-@@ -840,6 +843,8 @@ void server_options(char **args,int *arg
+@@ -875,6 +878,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
if (preserve_perms)
argstr[x++] = 'p';
if (recurse)
---- orig/rsync.c 2004-07-02 18:06:32
+--- orig/rsync.c 2004-07-16 20:07:23
+++ rsync.c 2004-07-03 20:17:33
@@ -25,6 +25,7 @@
extern int verbose;
extern int am_root;
extern int am_sender;
extern int am_generator;
-@@ -140,15 +141,16 @@ int set_perms(char *fname,struct file_st
+@@ -141,15 +142,16 @@ int set_perms(char *fname,struct file_st
st = &st2;
}
rsyserr(FERROR, errno, "failed to set times on %s",
full_fname(fname));
return 0;
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:17:33
-@@ -299,7 +299,8 @@ verb(
+@@ -300,7 +300,8 @@ verb(
-o, --owner preserve owner (root only)
-g, --group preserve group
-D, --devices preserve devices (root only)
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-W, --whole-file copy whole files, no incremental checks
-@@ -544,14 +545,23 @@ dit(bf(-D, --devices)) This option cause
+@@ -556,14 +557,23 @@ dit(bf(-D, --devices)) This option cause
block device information to the remote system to recreate these
devices. This option is only available to the super-user.
---- orig/rsync.c 2004-07-02 18:06:32
+--- orig/rsync.c 2004-07-16 20:07:23
+++ rsync.c 2004-07-03 20:17:55
-@@ -239,6 +239,9 @@ void finish_transfer(char *fname, char *
- if (make_backups && !make_backup(fname))
+@@ -247,6 +247,9 @@ void finish_transfer(char *fname, char *
return;
+ }
+ /* Change permissions before putting the file into place. */
+ set_perms(fnametmp, file, NULL, 0);
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
-@@ -248,7 +251,8 @@ void finish_transfer(char *fname, char *
+@@ -256,7 +259,8 @@ void finish_transfer(char *fname, char *
ret == -2 ? "copy" : "rename",
full_fname(fnametmp), fname);
do_unlink(fnametmp);
closedir(d);
}
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:21:27
@@ -50,6 +50,7 @@ int preserve_gid = 0;
int preserve_times = 0;
int dry_run = 0;
int local_server = 0;
int ignore_times = 0;
-@@ -308,7 +309,7 @@ void usage(enum logcode F)
+@@ -315,7 +316,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_DELETE_AFTER, OPT_DELETE_EXCLUDED, OPT_LINK_DEST,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -333,6 +334,7 @@ static struct poptOption long_options[]
+@@ -340,6 +341,7 @@ static struct poptOption long_options[]
{"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
{"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
{"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 },
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
-@@ -541,6 +543,31 @@ int parse_arguments(int *argc, const cha
+@@ -549,6 +551,31 @@ int parse_arguments(int *argc, const cha
XFLG_FATAL_ERRORS | XFLG_DEF_INCLUDE);
break;
case 'h':
usage(FINFO);
exit_cleanup(0);
-@@ -770,6 +797,9 @@ int parse_arguments(int *argc, const cha
+@@ -805,6 +832,9 @@ int parse_arguments(int *argc, const cha
}
}
return 1;
}
-@@ -871,6 +901,12 @@ void server_options(char **args,int *arg
+@@ -906,6 +936,12 @@ void server_options(char **args,int *arg
if (x != 1)
args[ac++] = argstr;
if (block_size) {
if (asprintf(&arg, "-B%u", block_size) < 0)
goto oom;
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:21:27
@@ -108,6 +108,7 @@
#define XFLG_DEF_INCLUDE (1<<1)
#define PERMS_REPORT (1<<0)
#define PERMS_SKIP_MTIME (1<<1)
-@@ -496,11 +497,16 @@ struct map_struct {
+@@ -498,11 +499,16 @@ struct map_struct {
#define MATCHFLG_INCLUDE (1<<4) /* this is an include, not an exclude */
#define MATCHFLG_DIRECTORY (1<<5) /* this matches only directories */
#define MATCHFLG_CLEAR_LIST (1<<6) /* this item is the "!" token */
};
struct exclude_list_struct {
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:21:27
-@@ -332,6 +332,7 @@ verb(
+@@ -333,6 +333,7 @@ verb(
--exclude-from=FILE exclude patterns listed in FILE
--include=PATTERN don't exclude files matching PATTERN
--include-from=FILE don't exclude patterns listed in FILE
--files-from=FILE read FILE for list of source-file names
-0 --from0 all file lists are delimited by nulls
--version print version number
-@@ -688,6 +689,28 @@ dit(bf(--include-from=FILE)) This specif
+@@ -700,6 +701,28 @@ dit(bf(--include-from=FILE)) This specif
from a file.
- If em(FILE) is bf(-) the list will be read from standard input.
+ If em(FILE) is "-" the list will be read from standard input.
+dit(bf(--inherit=DEPTH)) Using this option allows you to specify that the
+contents of per-directory merge files is inherited by the subdirectories of
+
dit(bf(--files-from=FILE)) Using this option allows you to specify the
exact list of files to transfer (as read from the specified FILE or "-"
- for stdin). It also tweaks the default behavior of rsync to make
-@@ -1039,6 +1062,11 @@ itemize(
+ for standard input). It also tweaks the default behavior of rsync to make
+@@ -1052,6 +1075,11 @@ itemize(
then it is always considered an exclude pattern, even if specified as
part of an include option. The prefix is discarded before matching.
it() if the pattern is a single exclamation mark ! then the current
include/exclude list is reset, removing all previously defined patterns.
)
-@@ -1091,6 +1119,67 @@ itemize(
+@@ -1104,6 +1132,67 @@ itemize(
it would be excluded by the "*")
)
+ if (verbose > 2)
+ rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest);
+}
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:18:02
-@@ -246,6 +246,12 @@ static void generate_and_send_sums(struc
+@@ -249,6 +249,12 @@ static void generate_and_send_sums(struc
*
* @note This comment was added later by mbp who was trying to work it
* out. It might be wrong.
}
if (dir)
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:18:02
-@@ -127,6 +127,7 @@ char *backup_dir = NULL;
+@@ -128,6 +128,7 @@ char *backup_dir = NULL;
char backup_dir_buf[MAXPATHLEN];
int rsync_port = RSYNC_PORT;
int link_dest = 0;
int verbose = 0;
int quiet = 0;
-@@ -270,6 +271,7 @@ void usage(enum logcode F)
+@@ -277,6 +278,7 @@ void usage(enum logcode F)
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");
rprintf(F," --exclude=PATTERN exclude files matching PATTERN\n");
-@@ -367,6 +369,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 },
This patch from Sami Farin lets you specify --fsync if you want fsync()
to be called on every file we write.
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:18:13
@@ -38,6 +38,7 @@ int make_backups = 0;
**/
int archive_mode = 0;
int keep_dirlinks = 0;
int copy_links = 0;
-@@ -232,6 +233,7 @@ void usage(enum logcode F)
+@@ -238,6 +239,7 @@ void usage(enum logcode F)
rprintf(F," -b, --backup make backups (see --suffix & --backup-dir)\n");
rprintf(F," --backup-dir make backups into this directory\n");
rprintf(F," --suffix=SUFFIX backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
+ rprintf(F," --fsync fsync every written file\n");
rprintf(F," -u, --update update only (don't overwrite newer files)\n");
+ rprintf(F," --inplace update the destination file inplace (see man page)\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
- rprintf(F," -l, --links copy symlinks as symlinks\n");
-@@ -336,6 +338,7 @@ static struct poptOption long_options[]
+@@ -343,6 +345,7 @@ static struct poptOption long_options[]
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
{"dry-run", 'n', POPT_ARG_NONE, &dry_run, 0, 0, 0 },
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"cvs-exclude", 'C', POPT_ARG_NONE, &cvs_exclude, 0, 0, 0 },
-@@ -960,6 +963,9 @@ void server_options(char **args,int *arg
+@@ -998,6 +1001,9 @@ void server_options(char **args,int *arg
args[ac++] = tmpdir;
}
if (compare_dest && am_sender) {
/* the server only needs this option if it is not the sender,
* and it may be an older version that doesn't know this
---- orig/receiver.c 2004-07-14 17:12:06
-+++ receiver.c 2004-07-03 20:18:13
-@@ -48,6 +48,7 @@ extern int ignore_errors;
- extern int orig_umask;
- extern int keep_partial;
- extern int checksum_seed;
+--- orig/receiver.c 2004-07-16 20:07:22
++++ receiver.c 2004-07-16 20:13:31
+@@ -35,6 +35,7 @@ extern int preserve_hard_links;
+ extern int preserve_perms;
+ extern int cvs_exclude;
+ extern int io_error;
+extern int do_fsync;
-
- static void delete_one(char *fn, int is_dir)
- {
-@@ -274,6 +275,12 @@ static int receive_data(int f_in,struct
+ extern char *tmpdir;
+ extern char *compare_dest;
+ extern int make_backups;
+@@ -289,6 +290,12 @@ static int receive_data(int f_in,struct
exit_cleanup(RERR_FILEIO);
}
extern int always_checksum;
extern char *compare_dest;
extern int link_dest;
-@@ -238,6 +239,94 @@ static void generate_and_send_sums(struc
+@@ -241,6 +242,94 @@ static void generate_and_send_sums(struc
}
/*
* Acts on file number @p i from @p flist, whose name is @p fname.
-@@ -253,7 +342,7 @@ static void recv_generator(char *fname,
+@@ -256,7 +345,7 @@ static void recv_generator(char *fname,
int fd;
STRUCT_STAT st;
struct map_struct *mapbuf;
char *fnamecmp;
char fnamecmpbuf[MAXPATHLEN];
-@@ -436,6 +525,14 @@ static void recv_generator(char *fname,
+@@ -439,6 +528,14 @@ static void recv_generator(char *fname,
} else
*fnamecmpbuf = '\0';
if (statret == -1) {
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
-@@ -482,7 +579,7 @@ static void recv_generator(char *fname,
+@@ -485,7 +582,7 @@ static void recv_generator(char *fname,
return;
}
if (!*fnamecmpbuf)
set_perms(fname, file, &st, PERMS_REPORT);
return;
---- orig/options.c 2004-07-15 16:51:50
-+++ options.c 2004-07-03 19:27:25
-@@ -94,6 +94,7 @@ int ignore_errors = 0;
- int modify_window = 0;
- int blocking_io = -1;
- int checksum_seed = 0;
+--- orig/options.c 2004-07-16 20:07:22
++++ options.c 2004-07-16 20:14:12
+@@ -85,6 +85,7 @@ int safe_symlinks = 0;
+ int copy_unsafe_links = 0;
+ int size_only = 0;
+ int bwlimit = 0;
+int fuzzy = 0;
- unsigned int block_size = 0;
-
-
-@@ -269,6 +270,7 @@ void usage(enum logcode F)
+ size_t bwlimit_writemax = 0;
+ int delete_after = 0;
+ int only_existing = 0;
+@@ -276,6 +277,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");
-@@ -367,6 +369,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 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -981,6 +984,9 @@ void server_options(char **args,int *arg
+@@ -1019,6 +1022,9 @@ void server_options(char **args,int *arg
}
}
extern int make_backups;
extern int do_progress;
extern char *backup_dir;
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 19:27:25
-@@ -325,6 +325,7 @@ verb(
+@@ -326,6 +326,7 @@ verb(
-T --temp-dir=DIR create temporary files in directory DIR
--compare-dest=DIR also compare received files relative to DIR
--link-dest=DIR create hardlinks to DIR for unchanged files
You must run "make proto" before compiling.
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:08:07
-@@ -248,7 +248,7 @@ static void generate_and_send_sums(struc
+@@ -251,7 +251,7 @@ static void generate_and_send_sums(struc
* out. It might be wrong.
*/
static void recv_generator(char *fname, struct file_struct *file, int i,
{
int fd;
STRUCT_STAT st;
-@@ -415,8 +415,10 @@ static void recv_generator(char *fname,
+@@ -418,8 +418,10 @@ static void recv_generator(char *fname,
statret = link_stat(fnamecmpbuf, &st, 0);
if (!S_ISREG(st.st_mode))
statret = -1;
#if HAVE_LINK
else if (link_dest && !dry_run) {
if (do_link(fnamecmpbuf, fname) != 0) {
-@@ -424,18 +426,22 @@ static void recv_generator(char *fname,
+@@ -427,18 +429,22 @@ static void recv_generator(char *fname,
rsyserr(FINFO, errno, "link %s => %s",
fnamecmpbuf, fname);
}
write_int(f_out,i);
if (!dry_run)
write_sum_head(f_out, NULL);
-@@ -455,19 +461,21 @@ static void recv_generator(char *fname,
+@@ -458,19 +464,21 @@ static void recv_generator(char *fname,
/* now pretend the file didn't exist */
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
&& cmp_modtime(st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
rprintf(FINFO,"%s is newer\n",fname);
-@@ -475,17 +483,21 @@ static void recv_generator(char *fname,
+@@ -478,17 +486,21 @@ static void recv_generator(char *fname,
}
if (skip_file(fname, file, &st)) {
write_int(f_out,i);
write_sum_head(f_out, NULL);
return;
-@@ -500,6 +512,8 @@ static void recv_generator(char *fname,
+@@ -503,6 +515,8 @@ static void recv_generator(char *fname,
/* pretend the file didn't exist */
if (preserve_hard_links && hard_link_check(file, HL_SKIP))
return;
write_int(f_out,i);
write_sum_head(f_out, NULL);
return;
-@@ -518,6 +532,8 @@ static void recv_generator(char *fname,
+@@ -521,6 +535,8 @@ static void recv_generator(char *fname,
if (verbose > 2)
rprintf(FINFO, "generating and sending sums for %d\n", i);
write_int(f_out,i);
generate_and_send_sums(mapbuf, st.st_size, f_out);
-@@ -527,7 +543,8 @@ static void recv_generator(char *fname,
+@@ -530,7 +546,8 @@ static void recv_generator(char *fname,
}
{
int i;
int phase = 0;
-@@ -568,7 +585,7 @@ void generate_files(int f_out, struct fi
+@@ -571,7 +588,7 @@ void generate_files(int f_out, struct fi
}
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
}
phase++;
-@@ -585,7 +602,7 @@ void generate_files(int f_out, struct fi
+@@ -588,7 +605,7 @@ void generate_files(int f_out, struct fi
while ((i = get_redo_num()) != -1) {
struct file_struct *file = flist->files[i];
recv_generator(local_name ? local_name : f_name_to(file, fbuf),
}
phase++;
-@@ -604,7 +621,7 @@ void generate_files(int f_out, struct fi
+@@ -607,7 +624,7 @@ void generate_files(int f_out, struct fi
if (!file->basename || !S_ISDIR(file->mode))
continue;
recv_generator(local_name ? local_name : f_name(file),
get_redo_num(); /* Read final MSG_DONE and any prior messages. */
report(-1);
---- orig/receiver.c 2004-07-14 17:12:06
+--- orig/receiver.c 2004-07-16 20:07:22
+++ receiver.c 2004-07-03 20:08:07
-@@ -289,14 +289,15 @@ static int receive_data(int f_in,struct
+@@ -304,14 +304,15 @@ static int receive_data(int f_in,struct
* main routine for receiver process.
*
* Receiver process runs on the same host as the generator process. */
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *mapbuf;
struct file_struct *file;
-@@ -358,19 +359,19 @@ int recv_files(int f_in, struct file_lis
+@@ -373,19 +374,19 @@ int recv_files(int f_in, struct file_lis
if (verbose > 2)
rprintf(FINFO,"recv_files(%s)\n",fname);
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
-@@ -379,7 +380,7 @@ int recv_files(int f_in, struct file_lis
+@@ -394,7 +395,7 @@ int recv_files(int f_in, struct file_lis
continue;
}
continue;
case '?':
/* Match anything but '/'. */
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:19:20
@@ -92,6 +92,7 @@ int opt_ignore_existing = 0;
int max_delete = 0;
+int ignore_case = 0;
int blocking_io = -1;
int checksum_seed = 0;
- unsigned int block_size = 0;
-@@ -278,6 +279,7 @@ void usage(enum logcode F)
+ int inplace = 0;
+@@ -285,6 +286,7 @@ void usage(enum logcode F)
rprintf(F," --include-from=FILE don't exclude patterns listed in FILE\n");
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," --daemon run as an rsync daemon\n");
rprintf(F," --no-detach do not detach from the parent\n");
-@@ -333,6 +335,7 @@ static struct poptOption long_options[]
+@@ -340,6 +342,7 @@ static struct poptOption long_options[]
{"include", 0, POPT_ARG_STRING, 0, OPT_INCLUDE, 0, 0 },
{"exclude-from", 0, POPT_ARG_STRING, 0, OPT_EXCLUDE_FROM, 0, 0 },
{"include-from", 0, POPT_ARG_STRING, 0, OPT_INCLUDE_FROM, 0, 0 },
{"safe-links", 0, POPT_ARG_NONE, &safe_symlinks, 0, 0, 0 },
{"help", 'h', POPT_ARG_NONE, 0, 'h', 0, 0 },
{"backup", 'b', POPT_ARG_NONE, &make_backups, 0, 0, 0 },
-@@ -928,6 +931,9 @@ void server_options(char **args,int *arg
+@@ -963,6 +966,9 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
+}
+
+#endif
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-03 20:20:15
-@@ -124,6 +124,7 @@ char *log_format = NULL;
+@@ -125,6 +125,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;
-@@ -269,6 +270,7 @@ void usage(enum logcode F)
+@@ -276,6 +277,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");
-@@ -309,7 +311,7 @@ void usage(enum logcode F)
+@@ -316,7 +318,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, 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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -367,6 +369,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 },
{"daemon", 0, POPT_ARG_NONE, &daemon_opt, 0, 0, 0 },
-@@ -593,6 +596,19 @@ int parse_arguments(int *argc, const cha
+@@ -601,6 +604,19 @@ 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). */
-@@ -969,6 +985,11 @@ void server_options(char **args,int *arg
+@@ -1007,6 +1023,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-07-14 17:12:06
-+++ receiver.c 2004-07-03 20:20:15
-@@ -48,6 +48,7 @@ extern int ignore_errors;
- extern int orig_umask;
- extern int keep_partial;
- extern int checksum_seed;
+--- orig/receiver.c 2004-07-16 20:07:22
++++ receiver.c 2004-07-16 20:16:37
+@@ -37,6 +37,7 @@ extern int cvs_exclude;
+ extern int io_error;
+ extern char *tmpdir;
+ extern char *compare_dest;
+extern char *link_by_hash_dir;
-
- static void delete_one(char *fn, int is_dir)
- {
-@@ -196,10 +197,11 @@ static int get_tmpname(char *fnametmp, c
+ extern int make_backups;
+ extern int do_progress;
+ extern char *backup_dir;
+@@ -197,10 +198,11 @@ static int get_tmpname(char *fnametmp, c
static int receive_data(int f_in,struct map_struct *mapbuf,int fd,char *fname,
unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
-@@ -210,6 +212,9 @@ static int receive_data(int f_in,struct
+@@ -211,6 +213,9 @@ static int receive_data(int f_in,struct
read_sum_head(f_in, &sum);
sum_init(checksum_seed);
while ((i = recv_token(f_in, &data)) != 0) {
-@@ -226,6 +231,8 @@ static int receive_data(int f_in,struct
+@@ -227,6 +232,8 @@ static int receive_data(int f_in,struct
cleanup_got_literal = 1;
sum_update(data,i);
if (fd != -1 && write_file(fd,data,i) != i) {
rsyserr(FERROR, errno, "write failed on %s",
-@@ -253,6 +260,8 @@ static int receive_data(int f_in,struct
+@@ -254,6 +261,8 @@ static int receive_data(int f_in,struct
see_token(map, len);
sum_update(map,len);
+ mdfour_update(&mdfour_data,map,len);
}
- if (fd != -1 && write_file(fd, map, len) != (int)len) {
-@@ -275,6 +284,8 @@ static int receive_data(int f_in,struct
+ if (!inplace || offset != offset2) {
+@@ -290,6 +299,8 @@ static int receive_data(int f_in,struct
}
sum_end(file_sum1);
read_buf(f_in,file_sum2,MD4_SUM_LENGTH);
if (verbose > 2)
-@@ -374,7 +385,7 @@ int recv_files(int f_in, struct file_lis
+@@ -389,7 +400,7 @@ int recv_files(int f_in, struct file_lis
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rsyserr(FERROR, errno, "fstat %s failed",
full_fname(fnamecmp));
close(fd1);
continue;
}
-@@ -387,7 +398,7 @@ int recv_files(int f_in, struct file_lis
+@@ -402,7 +413,7 @@ int recv_files(int f_in, struct file_lis
*/
rprintf(FERROR,"recv_files: %s is a directory\n",
full_fname(fnamecmp));
close(fd1);
continue;
}
-@@ -443,7 +454,7 @@ int recv_files(int f_in, struct file_lis
- if (fd2 == -1) {
- rsyserr(FERROR, errno, "mkstemp %s failed",
- full_fname(fnametmp));
-- receive_data(f_in,mapbuf,-1,NULL,file->length);
-+ receive_data(f_in,mapbuf,-1,NULL,file->length,NULL);
- if (mapbuf)
- unmap_file(mapbuf);
- if (fd1 != -1)
-@@ -457,7 +468,11 @@ int recv_files(int f_in, struct file_lis
+@@ -435,7 +446,7 @@ int recv_files(int f_in, struct file_lis
+ if (fd2 == -1) {
+ rsyserr(FERROR, errno, "open %s failed",
+ full_fname(fnamecmp));
+- receive_data(f_in,mapbuf,-1,NULL,file->length);
++ receive_data(f_in,mapbuf,-1,NULL,file->length,NULL);
+ if (mapbuf)
+ unmap_file(mapbuf);
+ if (fd1 != -1)
+@@ -472,7 +483,7 @@ int recv_files(int f_in, struct file_lis
+ if (fd2 == -1) {
+ rsyserr(FERROR, errno, "mkstemp %s failed",
+ full_fname(fnametmp));
+- receive_data(f_in,mapbuf,-1,NULL,file->length);
++ receive_data(f_in,mapbuf,-1,NULL,file->length,NULL);
+ if (mapbuf)
+ unmap_file(mapbuf);
+ if (fd1 != -1)
+@@ -487,7 +498,11 @@ int recv_files(int f_in, struct file_lis
rprintf(FINFO, "%s\n", fname);
/* recv file data */
log_recv(file, &initial_stats);
---- orig/rsync.c 2004-07-02 18:06:32
-+++ rsync.c 2004-07-03 20:20:15
-@@ -34,6 +34,7 @@ extern int force_delete;
+--- orig/rsync.c 2004-07-16 20:07:23
++++ rsync.c 2004-07-16 20:16:53
+@@ -33,6 +33,7 @@ extern int preserve_gid;
+ extern int force_delete;
extern int recurse;
extern int make_backups;
- extern char *backup_dir;
+extern char *link_by_hash_dir;
+ extern char *backup_dir;
+ extern int inplace;
-
- /*
-@@ -242,6 +243,12 @@ void finish_transfer(char *fname, char *
+@@ -250,6 +251,12 @@ void finish_transfer(char *fname, char *
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
ret = robust_rename(fnametmp, fname, file->mode & INITACCESSPERMS);
if (ret < 0) {
rsyserr(FERROR, errno, "%s %s -> \"%s\"",
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:20:15
-@@ -522,6 +522,14 @@ struct stats {
+@@ -524,6 +524,14 @@ struct stats {
int current_file_index;
};
#else
linkname_len = 0;
#endif
---- orig/options.c 2004-07-15 19:11:33
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-16 16:12:29
@@ -42,6 +42,7 @@ int archive_mode = 0;
int keep_dirlinks = 0;
int preserve_hard_links = 0;
int preserve_perms = 0;
int preserve_devices = 0;
-@@ -235,6 +236,7 @@ void usage(enum logcode F)
- rprintf(F," -u, --update update only (don't overwrite newer files)\n");
+@@ -242,6 +243,7 @@ void usage(enum logcode F)
+ rprintf(F," --inplace update the destination file inplace (see man page)\n");
rprintf(F," -K, --keep-dirlinks treat symlinked dir on receiver as dir\n");
rprintf(F," -l, --links copy symlinks as symlinks\n");
+ rprintf(F," --links-depth=NUM follow symlinks up to NUM depth\n");
rprintf(F," -L, --copy-links copy the referent of all symlinks\n");
rprintf(F," --copy-unsafe-links copy the referent of \"unsafe\" symlinks\n");
rprintf(F," --safe-links ignore \"unsafe\" symlinks\n");
-@@ -342,6 +344,7 @@ static struct poptOption long_options[]
- {"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
+@@ -350,6 +352,7 @@ static struct poptOption long_options[]
+ {"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
{"keep-dirlinks", 'K', POPT_ARG_NONE, &keep_dirlinks, 0, 0, 0 },
{"links", 'l', POPT_ARG_NONE, &preserve_links, 0, 0, 0 },
+ {"links-depth", 0, POPT_ARG_INT, &follow_links_depth , 0, 0, 0 },
---- orig/generator.c 2004-07-15 02:21:10
+--- orig/generator.c 2004-07-16 19:35:29
+++ generator.c 2004-07-03 20:20:46
@@ -39,6 +39,7 @@ extern int opt_ignore_existing;
extern int csum_length;
extern int io_timeout;
extern int protocol_version;
extern int always_checksum;
-@@ -325,6 +326,10 @@ static void recv_generator(char *fname,
+@@ -328,6 +329,10 @@ static void recv_generator(char *fname,
&& verbose && f_out != -1)
rprintf(FINFO,"%s/\n",fname);
return;
}
if (read_batch)
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-15 02:34:44
@@ -90,6 +90,7 @@ int delete_after = 0;
int only_existing = 0;
int ignore_errors = 0;
int modify_window = 0;
int blocking_io = -1;
-@@ -138,6 +139,7 @@ char *batch_name = NULL;
+@@ -139,6 +140,7 @@ char *batch_name = NULL;
static int daemon_opt; /* sets am_daemon after option error-reporting */
static int modify_window_set;
/** Local address to bind. As a character string because it's
* interpreted by the IPv6 layer: should be a numeric IP4 or IP6
-@@ -259,6 +261,7 @@ void usage(enum logcode F)
+@@ -266,6 +268,7 @@ void usage(enum logcode F)
rprintf(F," --delete-after receiver deletes after transferring, not before\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");
rprintf(F," --force force deletion of directories even if not empty\n");
rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n");
-@@ -309,7 +312,7 @@ void usage(enum logcode F)
+@@ -316,7 +319,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, 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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -363,6 +366,7 @@ static struct poptOption long_options[]
+@@ -371,6 +374,7 @@ static struct poptOption long_options[]
{"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
{"block-size", 'B', POPT_ARG_INT, &block_size, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 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 },
-@@ -577,6 +581,32 @@ int parse_arguments(int *argc, const cha
+@@ -585,6 +589,32 @@ int parse_arguments(int *argc, const cha
read_batch = 1;
break;
case OPT_TIMEOUT:
if (io_timeout && io_timeout < select_timeout)
select_timeout = io_timeout;
-@@ -883,6 +913,11 @@ void server_options(char **args,int *arg
+@@ -918,6 +948,11 @@ void server_options(char **args,int *arg
args[ac++] = arg;
}
if (io_timeout) {
if (asprintf(&arg, "--timeout=%d", io_timeout) < 0)
goto oom;
---- orig/rsync.yo 2004-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:20:46
-@@ -315,6 +315,7 @@ verb(
+@@ -316,6 +316,7 @@ verb(
--delete-after receiver deletes after transfer, not before
--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
--force force deletion of dirs even if not empty
--numeric-ids don't map uid/gid values by user/group name
-@@ -577,6 +578,11 @@ dit(bf(--max-delete=NUM)) This tells rsy
+@@ -589,6 +590,11 @@ dit(bf(--max-delete=NUM)) This tells rsy
files or directories. This is useful when mirroring very large trees
to prevent disasters.
if (*line == '#') {
/* it's some sort of command that I don't understand */
io_printf(f_out, "@ERROR: Unknown command '%s'\n", line);
---- orig/configure.in 2004-04-30 18:04:07
+--- orig/configure.in 2004-07-16 20:07:22
+++ configure.in 2004-07-03 20:22:28
@@ -271,6 +271,21 @@ yes
AC_SEARCH_LIBS(getaddrinfo, inet6)
p = strchr(host,'/');
if (p) {
*p = 0;
---- orig/options.c 2004-07-15 16:51:50
-+++ options.c 2004-07-15 02:41:12
-@@ -133,6 +133,14 @@ int quiet = 0;
+--- orig/options.c 2004-07-16 20:07:22
++++ options.c 2004-07-16 20:19:50
+@@ -134,6 +134,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;
-@@ -144,13 +152,13 @@ static int modify_window_set;
- * address, or a hostname. **/
- char *bind_address;
-
--
- static void print_rsync_version(enum logcode f)
- {
- char const *got_socketpair = "no ";
+@@ -153,6 +161,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
-@@ -169,6 +177,10 @@ static void print_rsync_version(enum log
+@@ -175,6 +184,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,
-@@ -182,10 +194,10 @@ static void print_rsync_version(enum log
+@@ -188,10 +201,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. */
-- rprintf(f, " %sIPv6, %d-bit system inums, %d-bit internal inums\n",
-+ rprintf(f, " %sIPv6, %d-bit system inums, %d-bit internal inums, %sssl\n",
- ipv6,
+- rprintf(f, " %sinplace, %sIPv6, %d-bit system inums, %d-bit internal inums\n",
++ rprintf(f, " %sinplace, %sIPv6, %d-bit system inums, %d-bit internal inums, %sssl\n",
+ have_inplace, ipv6,
(int) (sizeof dumstat->st_ino * 8),
- (int) (sizeof (uint64) * 8));
+ (int) (sizeof (uint64) * 8), ssl);
#ifdef MAINTAINER_MODE
rprintf(f, " panic action: \"%s\"\n",
get_panic_action());
-@@ -298,6 +310,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,"\n");
-@@ -309,7 +328,7 @@ void usage(enum logcode F)
+@@ -316,7 +336,7 @@ void usage(enum logcode F)
enum {OPT_VERSION = 1000, 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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -396,6 +415,13 @@ static struct poptOption long_options[]
+@@ -404,6 +424,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
{0,0,0,0, 0, 0, 0}
};
-@@ -593,6 +619,12 @@ int parse_arguments(int *argc, const cha
+@@ -601,6 +628,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). */
-@@ -732,6 +764,17 @@ int parse_arguments(int *argc, const cha
+@@ -756,6 +789,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-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:22:28
@@ -32,6 +32,7 @@
if (argc == 0)
list_only = 1;
---- orig/options.c 2004-07-15 16:51:50
-+++ options.c 2004-07-03 20:17:10
-@@ -87,6 +87,7 @@ int size_only = 0;
+--- orig/options.c 2004-07-16 20:07:22
++++ options.c 2004-07-16 20:09:54
+@@ -87,8 +87,10 @@ int size_only = 0;
int bwlimit = 0;
size_t bwlimit_writemax = 0;
int delete_after = 0;
+int delete_sent_files = 0;
int only_existing = 0;
int opt_ignore_existing = 0;
++int need_messages_from_generator = 0;
int max_delete = 0;
-@@ -94,6 +95,7 @@ int ignore_errors = 0;
+ int ignore_errors = 0;
int modify_window = 0;
- int blocking_io = -1;
- int checksum_seed = 0;
-+int need_messages_from_generator = 0;
- unsigned int block_size = 0;
-
-
-@@ -257,6 +259,7 @@ void usage(enum logcode F)
+@@ -264,6 +266,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," --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");
-@@ -307,8 +310,8 @@ void usage(enum logcode F)
+@@ -314,8 +317,8 @@ void usage(enum logcode F)
}
enum {OPT_VERSION = 1000, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT,
OPT_REFUSED_BASE = 9000};
-@@ -327,6 +330,7 @@ static struct poptOption long_options[]
+@@ -334,6 +337,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 },
-@@ -512,6 +516,11 @@ int parse_arguments(int *argc, const cha
+@@ -520,6 +524,11 @@ int parse_arguments(int *argc, const cha
delete_mode = 1;
break;
case OPT_EXCLUDE:
if (am_server || sanitize_paths)
return 0; /* Impossible... */
-@@ -981,6 +990,9 @@ void server_options(char **args,int *arg
+@@ -1019,6 +1028,9 @@ void server_options(char **args,int *arg
}
}
*argc = ac;
return;
---- orig/receiver.c 2004-07-14 17:12:06
-+++ receiver.c 2004-07-03 20:17:10
-@@ -48,6 +48,7 @@ extern int ignore_errors;
- extern int orig_umask;
- extern int keep_partial;
- extern int checksum_seed;
+--- orig/receiver.c 2004-07-16 20:07:22
++++ receiver.c 2004-07-16 20:09:48
+@@ -43,6 +43,7 @@ extern char *backup_dir;
+ extern char *backup_suffix;
+ extern int backup_suffix_len;
+ extern int cleanup_got_literal;
+extern int delete_sent_files;
-
- static void delete_one(char *fn, int is_dir)
- {
-@@ -296,7 +297,7 @@ int recv_files(int f_in, struct file_lis
+ extern int module_id;
+ extern int ignore_errors;
+ extern int orig_umask;
+@@ -311,7 +312,7 @@ int recv_files(int f_in, struct file_lis
char *fname, fbuf[MAXPATHLEN];
char template[MAXPATHLEN];
char fnametmp[MAXPATHLEN];
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *mapbuf;
struct file_struct *file;
-@@ -478,16 +479,20 @@ int recv_files(int f_in, struct file_lis
+@@ -508,16 +509,20 @@ int recv_files(int f_in, struct file_lis
cleanup_disable();
}
}
}
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:17:10
@@ -60,6 +60,7 @@
#define FLAG_TOP_DIR (1<<0)
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-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-03 20:17:10
-@@ -313,6 +313,7 @@ verb(
+@@ -314,6 +314,7 @@ verb(
--delete delete files that don't exist on sender
--delete-excluded also delete excluded files on receiver
--delete-after receiver deletes after transfer, not before
--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
-@@ -603,6 +604,11 @@ receiving side before transferring files
+@@ -615,6 +616,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.
dit(bf(--ignore-errors)) Tells --delete to go ahead and delete files
even when there are I/O errors.
---- orig/sender.c 2004-07-15 02:21:11
-+++ sender.c 2004-07-03 20:17:10
-@@ -27,6 +27,7 @@ extern int dry_run;
+--- orig/sender.c 2004-07-16 20:07:23
++++ sender.c 2004-07-16 20:10:19
+@@ -26,6 +26,7 @@ extern int io_error;
+ extern int dry_run;
extern int am_server;
extern int am_daemon;
- extern int protocol_version;
+extern int delete_sent_files;
+ extern int protocol_version;
+ extern struct stats stats;
-
- /**
-@@ -104,7 +105,29 @@ static struct sum_struct *receive_sums(i
+@@ -107,7 +108,29 @@ static struct sum_struct *receive_sums(i
return s;
}
void send_files(struct file_list *flist, int f_out, int f_in)
{
-@@ -123,6 +146,8 @@ void send_files(struct file_list *flist,
+@@ -125,6 +148,8 @@ void send_files(struct file_list *flist,
if (verbose > 2)
rprintf(FINFO, "send_files starting\n");
while (1) {
unsigned int offset;
-@@ -245,6 +270,9 @@ void send_files(struct file_list *flist,
+@@ -247,6 +272,9 @@ void send_files(struct file_list *flist,
if (verbose > 2)
rprintf(FINFO, "sender finished %s\n", fname);
if (last_io && io_timeout && (t-last_io) >= io_timeout) {
if (!am_server && !am_daemon) {
rprintf(FERROR, "io timeout after %d seconds - exiting\n",
---- orig/options.c 2004-07-15 16:51:50
+--- orig/options.c 2004-07-16 20:07:22
+++ options.c 2004-07-15 17:06:09
-@@ -95,6 +95,7 @@ int modify_window = 0;
- int blocking_io = -1;
+@@ -96,6 +96,7 @@ int blocking_io = -1;
int checksum_seed = 0;
+ int inplace = 0;
unsigned int block_size = 0;
+time_t stop_at_utime = 0;
/** Network address family. **/
-@@ -291,6 +292,8 @@ void usage(enum logcode F)
+@@ -298,6 +299,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");
rprintf(F," --checksum-seed=NUM set block/file checksum seed\n");
-@@ -310,6 +313,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, OP
+@@ -317,6 +320,7 @@ enum {OPT_VERSION = 1000, OPT_SENDER, 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_REFUSED_BASE = 9000};
static struct poptOption long_options[] = {
-@@ -382,6 +386,8 @@ static struct poptOption long_options[]
+@@ -390,6 +394,8 @@ static struct poptOption long_options[]
{"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 },
{"address", 0, POPT_ARG_STRING, &bind_address, 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 },
-@@ -593,6 +599,36 @@ int parse_arguments(int *argc, const cha
+@@ -601,6 +607,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). */
-@@ -895,6 +931,15 @@ void server_options(char **args,int *arg
+@@ -930,6 +966,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-07-15 02:21:11
+--- orig/rsync.yo 2004-07-16 20:07:23
+++ rsync.yo 2004-07-15 02:44:40
-@@ -347,6 +347,8 @@ verb(
+@@ -348,6 +348,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
-@@ -897,6 +899,19 @@ transfer was too fast, it will wait befo
+@@ -909,6 +911,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.
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
---- orig/rsync.h 2004-07-07 08:27:00
+--- orig/rsync.h 2004-07-16 20:07:23
+++ rsync.h 2004-07-03 20:23:33
@@ -159,6 +159,11 @@ enum msgcode {
#include <sys/socket.h>