f_name(f, NULL));
}
}
-@@ -2016,7 +2025,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2029,7 +2038,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
STRUCT_STAT st;
if (link_stat(fname, &st, 0) == 0
&& cmp_time(st.st_mtime, file->modtime) != 0)
}
change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
-@@ -566,7 +585,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -569,7 +588,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,
/* move tmp file over real file */
if (verbose > 2)
-@@ -593,7 +612,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -596,7 +615,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
do_set_file_attrs:
set_file_attrs(fnametmp, file, NULL, fnamecmp,
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -994,6 +995,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1000,6 +1001,12 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1701,7 +1708,10 @@ quote(itemization(
+@@ -1707,7 +1714,10 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -122,7 +122,7 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
{
#if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
if (S_ISLNK(mode))
-@@ -130,9 +130,13 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -131,9 +131,13 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
#endif
if (verbose > 2) {
}
if (dry_run)
-@@ -141,7 +145,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -142,7 +146,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
{
#ifdef HAVE_UTIMES
struct timeval t[2];
t[0].tv_usec = 0;
t[1].tv_sec = modtime;
t[1].tv_usec = 0;
-@@ -155,12 +159,12 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -156,12 +160,12 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
return utimes(fname, t);
#elif defined HAVE_STRUCT_UTIMBUF
struct utimbuf tbuf;
stat_x sx;
while (*fullpath == '.' && fullpath[1] == '/') {
-@@ -211,7 +235,8 @@ static int keep_backup(const char *fname)
+@@ -221,7 +245,8 @@ static int keep_backup(const char *fname)
if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
return 1; /* the file could have disappeared */
unmake_file(file);
return 0;
}
-@@ -322,7 +347,17 @@ static int keep_backup(const char *fname)
+@@ -358,7 +383,17 @@ static int keep_backup(const char *fname)
/* main backup switch routine */
int make_backup(const char *fname)
{
if (itemizing)
itemize(fnamecmp, file, ndx, statret, &sx, 0, 0, NULL);
#ifdef SUPPORT_HARD_LINKS
-@@ -2204,6 +2209,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2217,6 +2222,7 @@ void generate_files(int f_out, const char *local_name)
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
}
for (i = cur_flist->low; i <= cur_flist->high; i++) {
struct file_struct *file = cur_flist->sorted[i];
-@@ -2284,6 +2290,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2297,6 +2303,9 @@ void generate_files(int f_out, const char *local_name)
wait_for_receiver();
}
continue;
}
-@@ -844,6 +852,39 @@ int del_def_xattr_acl(const char *fname)
+@@ -886,6 +894,39 @@ int del_def_xattr_acl(const char *fname)
}
#endif
change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-@@ -615,7 +623,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -618,7 +626,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,
ATTRS_DELAY_IMMUTABLE
/* move tmp file over real file */
if (verbose > 2)
-@@ -646,7 +654,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -649,7 +657,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
do_set_file_attrs:
set_file_attrs(fnametmp, file, NULL, fnamecmp,
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -1022,6 +1023,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1028,6 +1029,9 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
dit(bf(--super)) This tells the receiving side to attempt super-user
activities even if the receiving rsync wasn't run by the super-user. These
activities include: preserving users via the bf(--owner) option, preserving
-@@ -1674,7 +1678,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1680,7 +1684,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -1733,6 +1737,8 @@ quote(itemization(
+@@ -1739,6 +1743,8 @@ quote(itemization(
it() The bf(f) means that the fileflags information changed.
it() The bf(a) means that the ACL information changed.
it() The bf(x) means that the extended attribute information changed.
return memcmp(sum, F_SUM(file), checksum_len) == 0;
}
-@@ -2161,6 +2163,9 @@ void generate_files(int f_out, const char *local_name)
+@@ -2174,6 +2176,9 @@ void generate_files(int f_out, const char *local_name)
: "enabled");
}
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -1490,6 +1492,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
+@@ -1496,6 +1498,17 @@ the bf(--partial-dir) option, that directory will be used instead. These
potential alternate-basis files will be removed as the transfer progresses.
This option conflicts with bf(--inplace) and bf(--append).
rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
full_fname(fname));
goto cleanup;
-@@ -2142,6 +2300,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2155,6 +2313,12 @@ void generate_files(int f_out, const char *local_name)
if (verbose > 2)
rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
if (delete_before && !solo_file && cur_flist->used > 0)
do_delete_pass();
if (delete_during == 2) {
-@@ -2152,7 +2316,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2165,7 +2329,7 @@ void generate_files(int f_out, const char *local_name)
}
do_progress = 0;
whole_file = 0;
if (verbose >= 2) {
rprintf(FINFO, "delta-transmission %s\n",
-@@ -2191,7 +2355,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2204,7 +2368,7 @@ void generate_files(int f_out, const char *local_name)
dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
} else
dirdev = MAKEDEV(0, 0);
} else
change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
}
-@@ -2235,7 +2399,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2248,7 +2412,21 @@ void generate_files(int f_out, const char *local_name)
} while ((cur_flist = cur_flist->next) != NULL);
if (delete_during)
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -1474,6 +1475,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
+@@ -1480,6 +1481,21 @@ Note that the use of the bf(--delete) option might get rid of any potential
fuzzy-match files, so either use bf(--delete-after) or specify some
filename exclusions if you need to prevent this.
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -1096,6 +1096,32 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1125,6 +1125,32 @@ int handle_partial_dir(const char *fname, int create)
return 1;
}
fnamecmp = fname;
fnamecmp_type = FNAMECMP_FNAME;
-@@ -2052,6 +2060,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2065,6 +2073,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
ignore_existing = -ignore_existing;
ignore_non_existing = -ignore_non_existing;
update_only = -update_only;
always_checksum = -always_checksum;
size_only = -size_only;
append_mode = -append_mode;
-@@ -2077,6 +2086,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+@@ -2090,6 +2099,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
ignore_existing = -ignore_existing;
ignore_non_existing = -ignore_non_existing;
update_only = -update_only;
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1043,6 +1044,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,10 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -41,6 +42,131 @@ char curr_dir[MAXPATHLEN];
+@@ -42,6 +43,131 @@ char curr_dir[MAXPATHLEN];
unsigned int curr_dir_len;
int curr_dir_depth; /* This is only set for a sanitizing daemon. */
#ifdef SUPPORT_HARD_LINKS
if (preserve_hard_links && F_HLINK_NOT_FIRST(file)
-@@ -2011,13 +2047,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
+@@ -2024,13 +2060,17 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
continue;
fname = f_name(file, NULL);
if (!(file->mode & S_IWUSR))
if (verbose > 1 && flags & ATTRS_REPORT) {
if (updated)
rprintf(FCLIENT, "%s\n", fname);
-@@ -566,7 +614,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -569,7 +617,8 @@ int finish_transfer(const char *fname, const char *fnametmp,
/* Change permissions before putting the file into place. */
set_file_attrs(fnametmp, file, NULL, fnamecmp,
/* move tmp file over real file */
if (verbose > 2)
-@@ -585,6 +634,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -588,6 +637,10 @@ int finish_transfer(const char *fname, const char *fnametmp,
}
if (ret == 0) {
/* The file was moved into place (not copied), so it's done. */
dit(--no-OPTION) You may turn off one or more implied options by prefixing
the option name with "no-". Not all options may be prefixed with a "no-":
-@@ -792,7 +797,7 @@ they would be using bf(--copy-links).
+@@ -798,7 +803,7 @@ they would be using bf(--copy-links).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
See also bf(--keep-dirlinks) for an analogous option for the receiving
side.
-@@ -929,6 +934,29 @@ super-user copies all namespaces except system.*. A normal user only copies
+@@ -935,6 +940,29 @@ super-user copies all namespaces except system.*. A normal user only copies
the user.* namespace. To be able to backup and restore non-user namespaces as
a normal user, see the bf(--fake-super) option.
dit(bf(--chmod)) This option tells rsync to apply one or more
comma-separated "chmod" strings to the permission of the files in the
transfer. The resulting value is treated as though it was the permissions
-@@ -1184,12 +1212,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
+@@ -1190,12 +1218,13 @@ See bf(--delete) (which is implied) for more details on file-deletion.
dit(bf(--ignore-errors)) Tells bf(--delete) to go ahead and delete files
even when there are I/O errors.
bf(--recursive) option was also enabled.
dit(bf(--max-delete=NUM)) This tells rsync not to delete more than NUM
-@@ -1645,7 +1674,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1651,7 +1680,7 @@ with older versions of rsync, but that also turns on the output of other
verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
type of update being done, bf(X) is replaced by the file-type, and the
other letters represent attributes that may be output if they are being
modified.
-@@ -1701,7 +1730,7 @@ quote(itemization(
+@@ -1707,7 +1736,7 @@ quote(itemization(
sender's value (requires bf(--owner) and super-user privileges).
it() A bf(g) means the group is different and is being updated to the
sender's value (requires bf(--group) and the authority to set the group).
int human_readable = 0;
int module_dirlen = 0;
+int force_change = 0;
+ int preserve_xattrs = 0;
mode_t orig_umask = 002;
char *partial_dir;
- char *module_dir;
-@@ -83,3 +84,23 @@ struct filter_list_struct daemon_filter_list;
+@@ -89,3 +90,23 @@ struct filter_list_struct daemon_filter_list;
{
return "tester";
}
extern int relative_paths;
extern int human_readable;
+extern int force_change;
+ extern int preserve_xattrs;
extern char *module_dir;
extern unsigned int module_dirlen;
- extern mode_t orig_umask;
-@@ -122,7 +123,7 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,7 +124,7 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
{
#if !defined HAVE_LUTIMES || !defined HAVE_UTIMES
if (S_ISLNK(mode))
-@@ -139,6 +140,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -140,6 +141,7 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
return 0;
{
#ifdef HAVE_UTIMES
struct timeval t[2];
t[0].tv_sec = time(NULL);
-@@ -152,20 +154,39 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
+@@ -153,20 +155,39 @@ int set_modtime(const char *fname, time_t modtime, mode_t mode)
return 0;
}
# endif
if (rsync_xal_get(fname, sxp->xattr) < 0) {
free_xattr(sxp);
return -1;
-@@ -814,6 +818,11 @@ int set_xattr(const char *fname, const struct file_struct *file,
+@@ -856,6 +860,11 @@ int set_xattr(const char *fname, const struct file_struct *file,
return -1;
}
ndx = F_XATTR(file);
return rsync_xal_set(fname, lst + ndx, fnamecmp, sxp);
}
-@@ -930,7 +939,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
+@@ -972,7 +981,7 @@ int set_stat_xattr(const char *fname, struct file_struct *file, mode_t new_mode)
mode = (fst.st_mode & _S_IFMT) | (fmode & ACCESSPERMS)
| (S_ISDIR(fst.st_mode) ? 0700 : 0600);
if (fst.st_mode != mode)
extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -315,6 +316,13 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -334,6 +335,13 @@ int copy_file(const char *source, const char *dest, int ofd,
full_fname(source));
}
+ }
+
if (close(ofd) < 0) {
+ int save_errno = errno;
rsyserr(FERROR_XFER, errno, "close failed on %s",
- full_fname(dest));
--address=ADDRESS bind address for outgoing socket to daemon
--port=PORT specify double-colon alternate port number
--sockopts=OPTIONS specify custom TCP options
-@@ -1432,6 +1433,10 @@ If you use this option with bf(--iconv), the args will also be translated
+@@ -1438,6 +1439,10 @@ If you use this option with bf(--iconv), the args will also be translated
from the local to the remote character-set. The translation happens before
wild-cards are expanded. See also the bf(--files-from) option.
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern struct chmod_mode_struct *daemon_chmod_modes;
#ifdef ICONV_OPTION
-@@ -571,8 +572,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -574,8 +575,15 @@ int finish_transfer(const char *fname, const char *fnametmp,
/* move tmp file over real file */
if (verbose > 2)
rprintf(FINFO, "renaming %s to %s\n", fnametmp, fname);
diff --git a/rsync.yo b/rsync.yo
--- a/rsync.yo
+++ b/rsync.yo
-@@ -2087,7 +2087,7 @@ by the server and defaults to the current code(time()). This option
+@@ -2093,7 +2093,7 @@ by the server and defaults to the current code(time()). This option
is used to set a specific checksum seed, which is useful for
applications that want repeatable block and file checksums, or
in the case where the user wants a more random checksum seed.
diff --git a/t_stub.c b/t_stub.c
--- a/t_stub.c
+++ b/t_stub.c
-@@ -29,6 +29,7 @@ int module_dirlen = 0;
+@@ -30,6 +30,7 @@ int preserve_xattrs = 0;
mode_t orig_umask = 002;
char *partial_dir;
char *module_dir;
struct filter_list_struct daemon_filter_list;
void rprintf(UNUSED(enum logcode code), const char *format, ...)
-@@ -69,6 +70,11 @@ struct filter_list_struct daemon_filter_list;
+@@ -75,6 +76,11 @@ struct filter_list_struct daemon_filter_list;
return -1;
}
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -30,9 +30,10 @@ extern int modify_window;
- extern int relative_paths;
+@@ -31,9 +31,10 @@ extern int relative_paths;
extern int human_readable;
+ extern int preserve_xattrs;
extern char *module_dir;
-extern unsigned int module_dirlen;
extern mode_t orig_umask;
extern struct filter_list_struct daemon_filter_list;
int sanitize_paths = 0;
-@@ -468,24 +469,44 @@ void kill_all(int sig)
+@@ -497,24 +498,44 @@ void kill_all(int sig)
/** Turn a user name into a uid */
int name_to_uid(const char *name, uid_t *uid_p)
{
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -994,6 +995,10 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
+@@ -1000,6 +1001,10 @@ it is preserving modification times (see bf(--times)). If NFS is sharing
the directories on the receiving side, it is a good idea to use bf(-O).
This option is inferred if you use bf(--backup) without bf(--backup-dir).
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1043,6 +1044,18 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,18 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.
extern int module_id;
extern int modify_window;
extern int relative_paths;
-@@ -273,6 +274,10 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -276,6 +277,10 @@ int copy_file(const char *source, const char *dest, int ofd,
int ifd;
char buf[1024 * 8];
int len; /* Number of bytes read into `buf'. */
+#endif
if ((ifd = do_open(source, O_RDONLY, 0)) < 0) {
- rsyserr(FERROR_XFER, errno, "open %s", full_fname(source));
-@@ -294,7 +299,27 @@ int copy_file(const char *source, const char *dest, int ofd,
+ int save_errno = errno;
+@@ -309,7 +314,27 @@ int copy_file(const char *source, const char *dest, int ofd,
}
}
+ offset += len;
+#endif
if (full_write(ofd, buf, len) < 0) {
+ int save_errno = errno;
rsyserr(FERROR_XFER, errno, "write %s", full_fname(dest));
- close(ifd);
-@@ -315,6 +340,16 @@ int copy_file(const char *source, const char *dest, int ofd,
+@@ -334,6 +359,16 @@ int copy_file(const char *source, const char *dest, int ofd,
full_fname(source));
}
+#endif
+
if (close(ofd) < 0) {
+ int save_errno = errno;
rsyserr(FERROR_XFER, errno, "close failed on %s",
- full_fname(dest));
--out-format=FORMAT output updates using the specified FORMAT
--log-file=FILE log what we're doing to the specified FILE
--log-file-format=FMT log updates using the specified FMT
-@@ -1020,16 +1021,16 @@ This is a good way to backup data without using a super-user, and to store
+@@ -1026,16 +1027,16 @@ This is a good way to backup data without using a super-user, and to store
ACLs from incompatible systems.
The bf(--fake-super) option only affects the side where the option is used.
This option is overridden by both bf(--super) and bf(--no-super).
-@@ -1275,6 +1276,36 @@ machine for use with the bf(--relative) option. For instance:
+@@ -1281,6 +1282,36 @@ machine for use with the bf(--relative) option. For instance:
quote(tt( rsync -avR --rsync-path="cd /a/b && rsync" host:c/d /e/))
dit(bf(-C, --cvs-exclude)) This is a useful shorthand for excluding a
broad range of files that you often don't want to transfer between
systems. It uses a similar algorithm to CVS to determine if
-@@ -1746,7 +1777,7 @@ option if you wish to override this.
+@@ -1752,7 +1783,7 @@ option if you wish to override this.
Here's a example command that requests the remote side to log what is
happening:
--del an alias for --delete-during
--delete delete extraneous files from dest dirs
--delete-before receiver deletes before transfer (default)
-@@ -1105,6 +1106,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
+@@ -1111,6 +1112,14 @@ dit(bf(--remove-source-files)) This tells rsync to remove from the sending
side the files (meaning non-directories) that are a part of the transfer
and have been successfully duplicated on the receiving side.
--protocol=NUM force an older protocol version to be used
--iconv=CONVERT_SPEC request charset conversion of filenames
--checksum-seed=NUM set block/file checksum seed (advanced)
-@@ -2033,6 +2036,33 @@ file previously generated by bf(--write-batch).
+@@ -2039,6 +2042,33 @@ file previously generated by bf(--write-batch).
If em(FILE) is bf(-), the batch data will be read from standard input.
See the "BATCH MODE" section for details.
-n, --dry-run perform a trial run with no changes made
-W, --whole-file copy files whole (w/o delta-xfer algorithm)
-x, --one-file-system don't cross filesystem boundaries
-@@ -1043,6 +1044,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
+@@ -1049,6 +1050,15 @@ NOTE: Don't use this option when the destination is a Solaris "tmpfs"
filesystem. It doesn't seem to handle seeks over null regions
correctly and ends up corrupting the files.
--write-batch=FILE write a batched update to FILE
--only-write-batch=FILE like --write-batch but w/o updating dest
--read-batch=FILE read a batched update from FILE
-@@ -2007,6 +2009,19 @@ transfer was too fast, it will wait before sending the next data block. The
+@@ -2013,6 +2015,19 @@ transfer was too fast, it will wait before sending the next data block. The
result is an average transfer rate equaling the specified limit. A value
of zero specifies no limit.
diff --git a/util.c b/util.c
--- a/util.c
+++ b/util.c
-@@ -122,6 +122,133 @@ NORETURN void overflow_exit(const char *str)
+@@ -123,6 +123,133 @@ NORETURN void overflow_exit(const char *str)
exit_cleanup(RERR_MALLOC);
}
--checksum-seed=NUM set block/file checksum seed (advanced)
-4, --ipv4 prefer IPv4
-6, --ipv6 prefer IPv6
-@@ -2071,6 +2072,22 @@ daemon uses the charset specified in its "charset" configuration parameter
+@@ -2077,6 +2078,22 @@ daemon uses the charset specified in its "charset" configuration parameter
regardless of the remote charset you actually pass. Thus, you may feel free to
specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)).
--timeout=SECONDS set I/O timeout in seconds
--contimeout=SECONDS set daemon connection timeout in seconds
-I, --ignore-times don't skip files that match size and time
-@@ -1602,6 +1604,46 @@ from the source system is used instead. See also the comments on the
+@@ -1608,6 +1610,46 @@ from the source system is used instead. See also the comments on the
the chroot setting affects rsync's ability to look up the names of the
users and groups and what you can do about it.
/* For large datums, we store a flag and a checksum. */
name_offset = 1 + MAX_DIGEST_LEN;
sum_init(checksum_seed);
-@@ -306,7 +308,7 @@ static int find_matching_xattr(item_list *xalp)
+@@ -348,7 +350,7 @@ static int find_matching_xattr(item_list *xalp)
|| rxas1[j].datum_len != rxas2[j].datum_len
|| strcmp(rxas1[j].name, rxas2[j].name))
break;
if (memcmp(rxas1[j].datum + 1,
rxas2[j].datum + 1,
MAX_DIGEST_LEN) != 0)
-@@ -343,13 +345,22 @@ int send_xattr(stat_x *sxp, int f)
+@@ -385,13 +387,22 @@ int send_xattr(stat_x *sxp, int f)
{
int ndx = find_matching_xattr(sxp->xattr);
for (rxa = sxp->xattr->items; count--; rxa++) {
size_t name_len = rxa->name_len;
const char *name = rxa->name;
-@@ -368,8 +379,8 @@ int send_xattr(stat_x *sxp, int f)
+@@ -410,8 +421,8 @@ int send_xattr(stat_x *sxp, int f)
name_len += UPRE_LEN;
}
#endif
#ifndef HAVE_LINUX_XATTRS
if (name_len > rxa->name_len) {
write_buf(f, USER_PREFIX, UPRE_LEN);
-@@ -377,7 +388,7 @@ int send_xattr(stat_x *sxp, int f)
+@@ -419,7 +430,7 @@ int send_xattr(stat_x *sxp, int f)
}
#endif
write_buf(f, name, name_len);
write_buf(f, rxa->datum + 1, MAX_DIGEST_LEN);
else
write_buf(f, rxa->datum, rxa->datum_len);
-@@ -427,7 +438,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
+@@ -469,7 +480,7 @@ int xattr_diff(struct file_struct *file, stat_x *sxp, int find_all)
cmp = rec_cnt ? strcmp(snd_rxa->name, rec_rxa->name) : -1;
if (cmp > 0)
same = 0;
same = cmp == 0 && snd_rxa->datum_len == rec_rxa->datum_len
&& memcmp(snd_rxa->datum + 1, rec_rxa->datum + 1,
MAX_DIGEST_LEN) == 0;
-@@ -470,6 +481,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
+@@ -512,6 +523,9 @@ void send_xattr_request(const char *fname, struct file_struct *file, int f_out)
int cnt, prior_req = 0;
rsync_xa *rxa;
lst += F_XATTR(file);
for (rxa = lst->items, cnt = lst->count; cnt--; rxa++) {
if (rxa->datum_len <= MAX_FULL_DATUM)
-@@ -524,6 +538,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
+@@ -566,6 +580,9 @@ int recv_xattr_request(struct file_struct *file, int f_in)
rsync_xa *rxa;
int rel_pos, cnt, num, got_xattr_data = 0;
if (F_XATTR(file) < 0) {
rprintf(FERROR, "recv_xattr_request: internal data error!\n");
exit_cleanup(RERR_STREAMIO);
-@@ -585,7 +602,22 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -627,7 +644,22 @@ void receive_xattr(struct file_struct *file, int f)
#else
int need_sort = 1;
#endif
if (ndx < 0 || (size_t)ndx > rsync_xal_l.count) {
rprintf(FERROR, "receive_xattr: xa index %d out of"
-@@ -598,7 +630,7 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -640,7 +672,7 @@ void receive_xattr(struct file_struct *file, int f)
return;
}
(void)EXPAND_ITEM_LIST(&temp_xattr, rsync_xa, count);
temp_xattr.count = 0;
}
-@@ -606,9 +638,10 @@ void receive_xattr(struct file_struct *file, int f)
+@@ -648,9 +680,10 @@ void receive_xattr(struct file_struct *file, int f)
for (num = 1; num <= count; num++) {
char *ptr, *name;
rsync_xa *rxa;