--- old/flist.c
+++ new/flist.c
-@@ -51,6 +51,7 @@ extern int preserve_devices;
+@@ -50,6 +50,7 @@ extern int preserve_devices;
extern int preserve_specials;
extern int preserve_uid;
extern int preserve_gid;
extern int relative_paths;
extern int implied_dirs;
extern int prune_empty_dirs;
-@@ -85,7 +86,13 @@ void init_flist(void)
+@@ -84,7 +85,13 @@ void init_flist(void)
struct file_struct f;
/* Figure out how big the file_struct is without trailing padding */
checksum_len = protocol_version < 21 ? 2 : MD4_SUM_LENGTH;
}
-@@ -141,16 +148,18 @@ static void list_file_entry(struct file_
+@@ -140,16 +147,18 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
f_name(f, NULL));
}
}
-@@ -312,6 +321,7 @@ static void send_file_entry(struct file_
+@@ -311,6 +320,7 @@ static void send_file_entry(struct file_
{
unsigned short flags;
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -327,7 +337,7 @@ static void send_file_entry(struct file_
+@@ -326,7 +336,7 @@ static void send_file_entry(struct file_
if (!file) {
write_byte(f, 0);
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -339,7 +349,7 @@ static void send_file_entry(struct file_
+@@ -338,7 +348,7 @@ static void send_file_entry(struct file_
f_name(file, fname);
if (file->mode == mode)
flags |= XMIT_SAME_MODE;
-@@ -375,6 +385,12 @@ static void send_file_entry(struct file_
+@@ -374,6 +384,12 @@ static void send_file_entry(struct file_
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#ifdef SUPPORT_HARD_LINKS
if (file->link_u.idev) {
-@@ -428,6 +444,8 @@ static void send_file_entry(struct file_
+@@ -427,6 +443,8 @@ static void send_file_entry(struct file_
write_int(f, modtime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
if (!numeric_ids)
add_uid(uid);
-@@ -496,6 +514,7 @@ static struct file_struct *receive_file_
+@@ -495,6 +513,7 @@ static struct file_struct *receive_file_
unsigned short flags, int f)
{
static time_t modtime;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -514,7 +533,7 @@ static struct file_struct *receive_file_
+@@ -513,7 +532,7 @@ static struct file_struct *receive_file_
struct file_struct *file;
if (!flist) {
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
-@@ -570,6 +589,8 @@ static struct file_struct *receive_file_
+@@ -569,6 +588,8 @@ static struct file_struct *receive_file_
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -625,6 +646,8 @@ static struct file_struct *receive_file_
+@@ -624,6 +645,8 @@ static struct file_struct *receive_file_
file->mode = mode;
file->uid = uid;
file->gid = gid;
if (dirname_len) {
file->dirname = lastdir = bp;
-@@ -650,12 +673,12 @@ static struct file_struct *receive_file_
+@@ -649,12 +672,12 @@ static struct file_struct *receive_file_
&& lastname[del_hier_name_len-1] == '.'
&& lastname[del_hier_name_len-2] == '/')
del_hier_name_len -= 2;
else
in_del_hier = 0;
}
-@@ -871,12 +894,14 @@ struct file_struct *make_file(char *fnam
+@@ -870,12 +893,14 @@ struct file_struct *make_file(char *fnam
memset(bp, 0, file_struct_len);
bp += file_struct_len;
#ifdef SUPPORT_HARD_LINKS
if (flist && flist->hlink_pool) {
-@@ -989,7 +1014,7 @@ static void send_if_directory(int f, str
+@@ -988,7 +1013,7 @@ static void send_if_directory(int f, str
char is_dot_dir = fbuf[ol-1] == '.' && (ol == 1 || fbuf[ol-2] == '/');
if (S_ISDIR(file->mode)
void *save_filters;
unsigned int len = strlen(fbuf);
if (len > 1 && fbuf[len-1] == '/')
-@@ -1595,8 +1620,9 @@ static void clean_flist(struct file_list
+@@ -1594,8 +1619,9 @@ static void clean_flist(struct file_list
}
/* Make sure we don't lose track of a user-specified
* top directory. */
clear_file(flist->files[drop], flist);
-@@ -1720,7 +1746,7 @@ static void output_flist(struct file_lis
+@@ -1719,7 +1745,7 @@ static void output_flist(struct file_lis
file->dirname ? file->dirname : "",
file->dirname ? "/" : "", NS(file->basename),
S_ISDIR(file->mode) ? "/" : "", (int)file->mode,
--- old/generator.c
+++ new/generator.c
-@@ -45,6 +45,7 @@ extern int preserve_perms;
+@@ -44,6 +44,7 @@ extern int preserve_perms;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_times;
extern int omit_dir_times;
extern int delete_mode;
extern int delete_before;
-@@ -91,6 +92,7 @@ extern dev_t filesystem_dev;
+@@ -90,6 +91,7 @@ extern dev_t filesystem_dev;
extern char *backup_dir;
extern char *backup_suffix;
extern int backup_suffix_len;
extern struct file_list *the_file_list;
extern struct filter_list_struct server_filter_list;
-@@ -185,7 +187,7 @@ static int delete_item(char *fname, int
+@@ -184,7 +186,7 @@ static int delete_item(char *fname, int
for (j = dirlist->count; j--; ) {
struct file_struct *fp = dirlist->files[j];
continue;
strlcpy(p, fp->basename, remainder);
-@@ -263,7 +265,7 @@ static void delete_in_dir(struct file_li
+@@ -262,7 +264,7 @@ static void delete_in_dir(struct file_li
filt_array[cur_depth] = push_local_filters(fbuf, dlen);
if (one_file_system) {
filesystem_dev = stp->st_dev;
else if (filesystem_dev != stp->st_dev)
return;
-@@ -275,7 +277,7 @@ static void delete_in_dir(struct file_li
+@@ -274,7 +276,7 @@ static void delete_in_dir(struct file_li
* from the filesystem. */
for (i = dirlist->count; i--; ) {
struct file_struct *fp = dirlist->files[i];
continue;
if (flist_find(flist, fp) < 0) {
f_name(fp, delbuf);
-@@ -301,11 +303,11 @@ static void do_delete_pass(struct file_l
+@@ -300,11 +302,11 @@ static void do_delete_pass(struct file_l
for (j = 0; j < flist->count; j++) {
struct file_struct *file = flist->files[j];
rprintf(FINFO, "deleting in %s\n", fbuf);
if (link_stat(fbuf, &st, keep_dirlinks) < 0
-@@ -349,6 +351,9 @@ void itemize(struct file_struct *file, i
+@@ -348,6 +350,9 @@ void itemize(struct file_struct *file, i
&& (!(iflags & ITEM_XNAME_FOLLOWS) || *xname))
|| (keep_time && cmp_time(file->modtime, st->st_mtime) != 0))
iflags |= ITEM_REPORT_TIME;
if ((file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS))
iflags |= ITEM_REPORT_PERMS;
if (preserve_uid && am_root && file->uid != st->st_uid)
-@@ -550,7 +555,7 @@ static int find_fuzzy(struct file_struct
+@@ -549,7 +554,7 @@ static int find_fuzzy(struct file_struct
uint32 dist;
if (!S_ISREG(fp->mode) || !fp->length
continue;
name = fp->basename;
-@@ -659,6 +664,8 @@ static int try_dests_reg(struct file_str
+@@ -658,6 +663,8 @@ static int try_dests_reg(struct file_str
itemizing && verbose > 1,
code) < 0)
goto try_a_copy;
/* open the file */
--- old/hlink.c
+++ new/hlink.c
-@@ -26,6 +26,7 @@ extern int link_dest;
+@@ -25,6 +25,7 @@ extern int link_dest;
extern int make_backups;
extern int log_format_has_i;
extern char *basis_dir[];
extern struct file_list *the_file_list;
#ifdef SUPPORT_HARD_LINKS
-@@ -86,10 +87,10 @@ static void link_idev_data(void)
+@@ -85,10 +86,10 @@ static void link_idev_data(void)
FPTR(cur)->link_u.links = pool_talloc(hlink_pool,
struct hlink, 1, "hlink_list");
hlink_list[to++] = head;
} else
FPTR(cur)->link_u.links = NULL;
-@@ -175,7 +176,7 @@ int hard_link_check(struct file_struct *
+@@ -174,7 +175,7 @@ int hard_link_check(struct file_struct *
{
#ifdef SUPPORT_HARD_LINKS
int head;
head = hlink_list[file->F_HLINDEX] = file->F_NEXT;
else
head = hlink_list[file->F_HLINDEX];
-@@ -270,8 +271,8 @@ void hard_link_cluster(struct file_struc
+@@ -269,8 +270,8 @@ void hard_link_cluster(struct file_struc
file->F_HLINDEX = FINISHED_LINK;
if (link_stat(f_name(file, hlink1), &st1, 0) < 0)
return;
ndx = file->F_NEXT;
file = FPTR(ndx);
}
-@@ -286,6 +287,6 @@ void hard_link_cluster(struct file_struc
+@@ -285,6 +286,6 @@ void hard_link_cluster(struct file_struc
maybe_hard_link(file, ndx, hlink2, statret, &st2,
hlink1, &st1, itemizing, code);
file->F_HLINDEX = FINISHED_LINK;
if (iflags & (ITEM_IS_NEW|ITEM_MISSING_DATA)) {
--- old/options.c
+++ new/options.c
-@@ -52,6 +52,7 @@ int preserve_uid = 0;
+@@ -53,6 +53,7 @@ int preserve_uid = 0;
int preserve_gid = 0;
int preserve_times = 0;
int omit_dir_times = 0;
int update_only = 0;
int cvs_exclude = 0;
int dry_run = 0;
-@@ -299,8 +300,9 @@ void usage(enum logcode F)
+@@ -301,8 +302,9 @@ void usage(enum logcode F)
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --specials preserve special files\n");
rprintf(F," -D same as --devices --specials\n");
rprintf(F," --super receiver attempts super-user activities\n");
rprintf(F," -S, --sparse handle sparse files efficiently\n");
rprintf(F," -n, --dry-run show what would have been transferred\n");
-@@ -411,6 +413,9 @@ static struct poptOption long_options[]
+@@ -413,6 +415,9 @@ static struct poptOption long_options[]
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 2, 0, 0 },
{"modify-window", 0, POPT_ARG_INT, &modify_window, OPT_MODIFY_WINDOW, 0, 0 },
{"super", 0, POPT_ARG_VAL, &am_root, 2, 0, 0 },
-@@ -1510,6 +1515,8 @@ void server_options(char **args,int *arg
+@@ -1519,6 +1524,8 @@ void server_options(char **args,int *arg
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -135,6 +137,7 @@
- #define FNAMECMP_FUZZY 0x83
-
- /* For use by the itemize_changes code */
-+#define ITEM_REPORT_ATIME (1<<0)
- #define ITEM_REPORT_CHECKSUM (1<<1)
- #define ITEM_REPORT_SIZE (1<<2)
- #define ITEM_REPORT_TIME (1<<3)
-@@ -520,9 +523,12 @@ struct file_struct {
+@@ -522,9 +524,12 @@ struct file_struct {
uid_t uid;
gid_t gid;
mode_t mode;
* by doubling until FLIST_LINEAR then grow by FLIST_LINEAR
--- old/rsync.yo
+++ new/rsync.yo
-@@ -325,8 +325,9 @@ to the detailed description below for a
+@@ -327,8 +327,9 @@ to the detailed description below for a
--devices preserve device files (super-user only)
--specials preserve special files
-D same as --devices --specials
--super receiver attempts super-user activities
-S, --sparse handle sparse files efficiently
-n, --dry-run show what would have been transferred
-@@ -814,6 +815,12 @@ it is preserving modification times (see
+@@ -851,6 +852,12 @@ it is preserving modification times (see
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
-@@ -1322,7 +1329,7 @@ with older versions of rsync, but that a
+@@ -1366,7 +1373,7 @@ with older versions of rsync, but that a
verbose messages).
The "%i" escape has a cryptic output that is 9 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.
-@@ -1362,7 +1369,7 @@ quote(itemize(
+@@ -1406,7 +1413,7 @@ quote(itemize(
by the file transfer.
it() A bf(t) means the modification time is different and is being updated
to the sender's value (requires bf(--times)). An alternate value of bf(T)
anytime a symlink is transferred, or when a file or device is transferred
without bf(--times).
it() A bf(p) means the permissions are different and are being updated to
-@@ -1371,7 +1378,10 @@ quote(itemize(
+@@ -1415,7 +1422,10 @@ quote(itemize(
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).