The first version of my reworked xattr patch. We now use a checksum
[rsync/rsync-patches.git] / flags.diff
index 4c9e233..62d737c 100644 (file)
@@ -74,9 +74,9 @@ TODO: fix --delete-delay to work with --flags option.
 +              write_int(f, (int)fileflags);
 +#endif
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
-               write_abbrevint30(f, uid);
-               if (flags & XMIT_USER_NAME_FOLLOWS) {
-@@ -561,6 +575,9 @@ static struct file_struct *recv_file_ent
+               if (protocol_version < 30)
+                       write_int(f, uid);
+@@ -571,6 +585,9 @@ static struct file_struct *recv_file_ent
  {
        static time_t modtime;
        static mode_t mode;
@@ -86,7 +86,7 @@ TODO: fix --delete-delay to work with --flags option.
        static int64 dev;
        static dev_t rdev;
        static uint32 rdev_major;
-@@ -656,9 +673,12 @@ static struct file_struct *recv_file_ent
+@@ -667,9 +684,12 @@ 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));
@@ -99,8 +99,8 @@ TODO: fix --delete-delay to work with --flags option.
 +#endif
  
        if (preserve_uid && !(flags & XMIT_SAME_UID)) {
-               uid = (uid_t)read_abbrevint30(f);
-@@ -766,6 +786,10 @@ static struct file_struct *recv_file_ent
+               if (protocol_version < 30)
+@@ -787,6 +807,10 @@ static struct file_struct *recv_file_ent
                OPT_EXTRA(file, 0)->unum = (uint32)(file_length >> 32);
        }
        file->mode = mode;
@@ -111,7 +111,7 @@ TODO: fix --delete-delay to work with --flags option.
        if (preserve_uid)
                F_OWNER(file) = uid;
        if (preserve_gid)
-@@ -1071,6 +1095,10 @@ struct file_struct *make_file(const char
+@@ -1092,6 +1116,10 @@ struct file_struct *make_file(const char
                OPT_EXTRA(file, 0)->unum = (uint32)(st.st_size >> 32);
        }
        file->mode = st.st_mode;
@@ -455,10 +455,10 @@ TODO: fix --delete-delay to work with --flags option.
 --- 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_FLAGS (1<<15)
+ #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_FLAGS (1<<14)               /* protocols ?? - NOW */
  
  /* These flags are used in the live flist data. */