Fixed failing hunks.
[rsync/rsync-patches.git] / xattrs.diff
index e1d1a90..ff1d1da 100644 (file)
@@ -153,7 +153,7 @@ TODO:
  extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
-@@ -749,6 +750,10 @@ static struct file_struct *recv_file_ent
+@@ -800,6 +801,10 @@ static struct file_struct *recv_file_ent
        if (preserve_acls)
                receive_acl(file, f);
  #endif
@@ -164,7 +164,7 @@ TODO:
  
        return file;
  }
-@@ -1010,7 +1015,7 @@ static struct file_struct *send_file_nam
+@@ -1061,7 +1066,7 @@ static struct file_struct *send_file_nam
                                          unsigned short flags)
  {
        struct file_struct *file;
@@ -173,7 +173,7 @@ TODO:
        statx sx;
  #endif
  
-@@ -1030,6 +1035,13 @@ static struct file_struct *send_file_nam
+@@ -1081,6 +1086,13 @@ static struct file_struct *send_file_nam
                        return NULL;
        }
  #endif
@@ -187,17 +187,17 @@ TODO:
  
        maybe_emit_filelist_progress(flist->count + flist_count_offset);
  
-@@ -1040,6 +1052,10 @@ static struct file_struct *send_file_nam
-       if (preserve_acls && f >= 0)
-               send_acl(&sx, f);
+@@ -1092,6 +1104,10 @@ static struct file_struct *send_file_nam
+               if (preserve_acls)
+                       send_acl(&sx, f);
  #endif
 +#ifdef SUPPORT_XATTRS
-+      if (preserve_xattrs && f >= 0)
-+              send_xattr(&sx, f);
++              if (preserve_xattrs)
++                      send_xattr(&sx, f);
 +#endif
+       }
        return file;
  }
 --- old/lib/sysxattr.c
 +++ new/lib/sysxattr.c
 @@ -0,0 +1,135 @@
@@ -495,7 +495,7 @@ TODO:
         * will enable owner-writability using chmod, if necessary.
 --- old/rsync.h
 +++ new/rsync.h
-@@ -508,6 +508,10 @@ struct idev {
+@@ -516,6 +516,10 @@ struct idev_node {
  #define ACLS_NEED_MASK 1
  #endif
  
@@ -506,7 +506,7 @@ TODO:
  #define GID_NONE ((gid_t)-1)
  
  struct file_struct {
-@@ -557,6 +561,7 @@ extern int preserve_gid;
+@@ -568,6 +572,7 @@ extern int preserve_gid;
  #define F_UID(f) REQ_EXTRA(f, preserve_uid)->uid
  #define F_GID(f) REQ_EXTRA(f, preserve_gid)->gid
  #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->unum
@@ -514,7 +514,7 @@ TODO:
  
  /* These items are per-entry optional and mutally exclusive: */
  #define F_HL_IDEV(f) OPT_EXTRA(f, LEN64_BUMP(f))->idev
-@@ -732,6 +737,9 @@ typedef struct {
+@@ -744,6 +749,9 @@ typedef struct {
      struct rsync_acl *acc_acl; /* access ACL */
      struct rsync_acl *def_acl; /* default ACL */
  #endif