Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Matt's recent improvements, slightly edited.
[rsync/rsync-patches.git]
/
atimes.diff
diff --git
a/atimes.diff
b/atimes.diff
index
721af1a
..
491d4dd
100644
(file)
--- a/
atimes.diff
+++ b/
atimes.diff
@@
-19,7
+19,7
@@
To use this patch, run these commands for a successful build:
--- old/flist.c
+++ new/flist.c
--- old/flist.c
+++ new/flist.c
-@@ -4
8,6 +48
,7 @@ extern int preserve_devices;
+@@ -4
9,6 +49
,7 @@ extern int preserve_devices;
extern int preserve_specials;
extern int preserve_uid;
extern int preserve_gid;
extern int preserve_specials;
extern int preserve_uid;
extern int preserve_gid;
@@
-27,7
+27,7
@@
To use this patch, run these commands for a successful build:
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
extern int relative_paths;
extern int implied_dirs;
extern int file_extra_cnt;
-@@ -14
3,6 +144
,7 @@ void show_flist_stats(void)
+@@ -14
4,6 +145
,7 @@ void show_flist_stats(void)
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
@@
-35,7
+35,7
@@
To use this patch, run these commands for a successful build:
double len;
if (!F_IS_ACTIVE(f)) {
double len;
if (!F_IS_ACTIVE(f)) {
-@@ -15
7,14 +159
,16 @@ static void list_file_entry(struct file_
+@@ -15
8,14 +160
,16 @@ static void list_file_entry(struct file_
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
@@
-54,7
+54,7
@@
To use this patch, run these commands for a successful build:
f_name(f, NULL));
}
}
f_name(f, NULL));
}
}
-@@ -34
8,6 +352
,7 @@ int push_flist_dir(const char *dir, int
+@@ -34
9,6 +353
,7 @@ int push_flist_dir(const char *dir, int
static void send_file_entry(int f, struct file_struct *file, int ndx)
{
static time_t modtime;
static void send_file_entry(int f, struct file_struct *file, int ndx)
{
static time_t modtime;
@@
-62,7
+62,7
@@
To use this patch, run these commands for a successful build:
static mode_t mode;
static int64 dev;
static dev_t rdev;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -41
5,6 +420
,13 @@ static void send_file_entry(int f, struc
+@@ -41
6,6 +421
,13 @@ static void send_file_entry(int f, struc
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
flags |= XMIT_SAME_TIME;
else
modtime = file->modtime;
@@
-76,16
+76,16
@@
To use this patch, run these commands for a successful build:
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
#ifdef SUPPORT_HARD_LINKS
if (tmp_dev != 0) {
-@@ -48
2,6 +494
,8 @@ static void send_file_entry(int f, struc
+@@ -48
3,6 +495
,8 @@ static void send_file_entry(int f, struc
write_int(f, modtime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
+ if (preserve_atimes && !S_ISDIR(mode) && !(flags & XMIT_SAME_ATIME))
+ write_int(f, atime);
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
write_int(f, modtime);
if (!(flags & XMIT_SAME_MODE))
write_int(f, to_wire_mode(mode));
+ if (preserve_atimes && !S_ISDIR(mode) && !(flags & XMIT_SAME_ATIME))
+ write_int(f, atime);
if (preserve_uid && !(flags & XMIT_SAME_UID)) {
- write_abbrevint30(f, uid);
- if (flags & XMIT_USER_NAME_FOLLOWS) {
-@@ -5
58,7 +572
,7 @@ static void send_file_entry(int f, struc
+ if (protocol_version < 30)
+ write_int(f, uid);
+@@ -5
69,7 +583
,7 @@ static void send_file_entry(int f, struc
static struct file_struct *recv_file_entry(struct file_list *flist,
int flags, int f)
{
static struct file_struct *recv_file_entry(struct file_list *flist,
int flags, int f)
{
@@
-94,7
+94,7
@@
To use this patch, run these commands for a successful build:
static mode_t mode;
static int64 dev;
static dev_t rdev;
static mode_t mode;
static int64 dev;
static dev_t rdev;
-@@ -6
55,6 +669
,8 @@ static struct file_struct *recv_file_ent
+@@ -6
67,6 +681
,8 @@ static struct file_struct *recv_file_ent
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
modtime = (time_t)read_int(f);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
@@
-103,7
+103,7
@@
To use this patch, run these commands for a successful build:
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
if (chmod_modes && !S_ISLNK(mode))
mode = tweak_mode(mode, chmod_modes);
-@@ -7
69,6 +785
,8 @@ static struct file_struct *recv_file_ent
+@@ -7
91,6 +807
,8 @@ static struct file_struct *recv_file_ent
F_OWNER(file) = uid;
if (preserve_gid)
F_GROUP(file) = gid;
F_OWNER(file) = uid;
if (preserve_gid)
F_GROUP(file) = gid;
@@
-112,7
+112,7
@@
To use this patch, run these commands for a successful build:
if (basename != thisname) {
file->dirname = lastdir;
if (basename != thisname) {
file->dirname = lastdir;
-@@ -10
74,6 +1092
,8 @@ struct file_struct *make_file(const char
+@@ -10
96,6 +1114
,8 @@ struct file_struct *make_file(const char
F_OWNER(file) = st.st_uid;
if (preserve_gid)
F_GROUP(file) = st.st_gid;
F_OWNER(file) = st.st_uid;
if (preserve_gid)
F_GROUP(file) = st.st_gid;
@@
-281,10
+281,10
@@
To use this patch, run these commands for a successful build:
--- old/rsync.h
+++ new/rsync.h
@@ -56,6 +56,7 @@
--- old/rsync.h
+++ new/rsync.h
@@ -56,6 +56,7 @@
- #define XMIT_RDEV_MINOR_
IS_SMALL (1<<11)
- #define XMIT_
USER_NAME_FOLLOWS (1<<12) /* protocols >= 30
*/
- #define XMIT_
GROUP_NAME_FOLLOWS (1<<13) /* protocols >= 30
*/
-+#define XMIT_SAME_ATIME (1<<1
4) /* protocols >= 30
*/
+ #define XMIT_RDEV_MINOR_
8_pre30 (1<<11) /* protocols 28 - 29 */
+ #define XMIT_
GROUP_NAME_FOLLOWS (1<<11) /* protocols 30 - NOW
*/
+ #define XMIT_
HLINK_FIRST (1<<12) /* protocols 30 - NOW
*/
++#define XMIT_SAME_ATIME (1<<1
3) /* protocols ?? - NOW
*/
/* These flags are used in the live flist data. */
/* These flags are used in the live flist data. */