#ifdef ICONV_OPTION
int ic_ndx;
-@@ -112,6 +113,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -125,6 +126,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
static time_t modtime;
+ static time_t atime;
static mode_t mode;
+ #ifdef SUPPORT_HARD_LINKS
static int64 dev;
- static dev_t rdev;
-@@ -432,6 +434,13 @@ static void send_file_entry(int f, struc
+@@ -440,6 +442,13 @@ static void send_file_entry(int f, struc
xflags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -505,6 +514,8 @@ static void send_file_entry(int f, struc
+@@ -513,6 +522,8 @@ static void send_file_entry(int f, struc
}
if (!(xflags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
if (uid_ndx && !(xflags & XMIT_SAME_UID)) {
if (protocol_version < 30)
write_int(f, uid);
-@@ -591,7 +602,7 @@ static void send_file_entry(int f, struc
+@@ -599,7 +610,7 @@ static void send_file_entry(int f, struc
static struct file_struct *recv_file_entry(struct file_list *flist,
int xflags, int f)
{
- static int64 modtime;
+ static int64 modtime, atime;
static mode_t mode;
+ #ifdef SUPPORT_HARD_LINKS
static int64 dev;
- static dev_t rdev;
-@@ -722,6 +733,16 @@ static struct file_struct *recv_file_ent
+@@ -732,6 +743,16 @@ static struct file_struct *recv_file_ent
}
if (!(xflags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -850,6 +871,8 @@ static struct file_struct *recv_file_ent
+@@ -860,6 +881,8 @@ static struct file_struct *recv_file_ent
F_GROUP(file) = gid;
file->flags |= gid_flags;
}
#ifdef ICONV_OPTION
if (ic_ndx)
F_NDX(file) = flist->used + flist->ndx_start;
-@@ -1172,6 +1195,8 @@ struct file_struct *make_file(const char
+@@ -1186,6 +1209,8 @@ struct file_struct *make_file(const char
F_OWNER(file) = st.st_uid;
if (gid_ndx)
F_GROUP(file) = st.st_gid;
+ if (preserve_atimes && !S_ISDIR(file->mode) && !S_ISLNK(file->mode)
+ && cmp_time(F_ATIME(file), sxp->st.st_atime) != 0)
+ iflags |= ITEM_REPORT_ATIME;
- if (!BITS_EQUAL(sxp->st.st_mode, file->mode, CHMOD_BITS))
- iflags |= ITEM_REPORT_PERMS;
- if (uid_ndx && am_root && (uid_t)F_OWNER(file) != sxp->st.st_uid)
-@@ -879,6 +883,8 @@ static int try_dests_reg(struct file_str
+ #if !defined HAVE_LCHMOD && !defined HAVE_SETATTRLIST
+ if (S_ISLNK(file->mode)) {
+ ;
+@@ -884,6 +888,8 @@ static int try_dests_reg(struct file_str
if (link_dest) {
if (!hard_link_one(file, fname, cmpbuf, 1))
goto try_a_copy;
if (preserve_hard_links && F_IS_HLINKED(file))
finish_hard_link(file, fname, ndx, &sxp->st, itemizing, code, j);
if (itemizing && (verbose > 1 || stdout_format_has_i > 1)) {
-@@ -1075,6 +1081,7 @@ static int try_dests_non(struct file_str
+@@ -1080,6 +1086,7 @@ static int try_dests_non(struct file_str
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
double len;
if (!F_IS_ACTIVE(f)) {
-@@ -1089,14 +1096,16 @@ static void list_file_entry(struct file_
+@@ -1094,14 +1101,16 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
f_name(f, NULL));
}
}
-@@ -1846,7 +1855,7 @@ static void touch_up_dirs(struct file_li
+@@ -1851,7 +1860,7 @@ static void touch_up_dirs(struct file_li
if (!(file->mode & S_IWUSR))
do_chmod(fname, file->mode);
if (need_retouch_dir_times)
{"omit-dir-times", 'O', POPT_ARG_VAL, &omit_dir_times, 1, 0, 0 },
{"no-omit-dir-times",0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
{"no-O", 0, POPT_ARG_VAL, &omit_dir_times, 0, 0, 0 },
-@@ -1717,6 +1722,8 @@ void server_options(char **args, int *ar
+@@ -1713,6 +1718,8 @@ void server_options(char **args, int *ar
argstr[x++] = 'D';
if (preserve_times)
argstr[x++] = 't';
extern int preserve_times;
extern int am_root;
extern int am_server;
-@@ -343,6 +344,7 @@ int set_file_attrs(const char *fname, st
+@@ -340,6 +341,7 @@ int set_file_attrs(const char *fname, st
int updated = 0;
stat_x sx2;
int change_uid, change_gid;
mode_t new_mode = file->mode;
int inherit;
-@@ -383,18 +385,36 @@ int set_file_attrs(const char *fname, st
+@@ -380,18 +382,36 @@ int set_file_attrs(const char *fname, st
set_stat_xattr(fname, file);
#endif
/* These flags are used in the live flist data. */
-@@ -144,6 +145,7 @@
+@@ -145,6 +146,7 @@
#define ATTRS_REPORT (1<<0)
#define ATTRS_SKIP_MTIME (1<<1)
#define FULL_FLUSH 1
#define NORMAL_FLUSH 0
-@@ -582,6 +584,7 @@ extern int file_extra_cnt;
+@@ -602,6 +604,7 @@ extern int file_extra_cnt;
extern int inc_recurse;
extern int uid_ndx;
extern int gid_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -619,6 +622,7 @@ extern int xattrs_ndx;
+@@ -639,6 +642,7 @@ extern int xattrs_ndx;
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
#define F_NDX(f) REQ_EXTRA(f, ic_ndx)->num
--- old/rsync.yo
+++ new/rsync.yo
-@@ -350,6 +350,7 @@ to the detailed description below for a
+@@ -349,6 +349,7 @@ to the detailed description below for a
-D same as --devices --specials
-t, --times preserve modification times
-O, --omit-dir-times omit directories from --times
--super receiver attempts super-user activities
--fake-super store/recover privileged attrs using xattrs
-S, --sparse handle sparse files efficiently
-@@ -960,6 +961,12 @@ it is preserving modification times (see
+@@ -965,6 +966,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
-@@ -1641,8 +1648,10 @@ quote(itemization(
+@@ -1646,8 +1653,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).