Fixed failing hunks.
[rsync/rsync-patches.git] / xattrs.diff
index 2bfc713..8c9d532 100644 (file)
@@ -54,7 +54,7 @@ TODO:
  extern int preserve_devices;
  extern int preserve_specials;
  extern int preserve_links;
-@@ -137,6 +138,9 @@ static int make_bak_dir(char *fullpath)
+@@ -135,6 +136,9 @@ static int make_bak_dir(char *fullpath)
  #ifdef SUPPORT_ACLS
                                sx.acc_acl = sx.def_acl = NULL;
  #endif
@@ -64,7 +64,7 @@ TODO:
                                if (!(file = make_file(rel, NULL, NULL, 0, NO_FILTERS)))
                                        continue;
  #ifdef SUPPORT_ACLS
-@@ -145,6 +149,12 @@ static int make_bak_dir(char *fullpath)
+@@ -143,6 +147,12 @@ static int make_bak_dir(char *fullpath)
                                        cache_acl(file, &sx);
                                }
  #endif
@@ -77,7 +77,7 @@ TODO:
                                set_file_attrs(fullpath, file, NULL, 0);
                                free(file);
                        }
-@@ -196,6 +206,9 @@ static int keep_backup(const char *fname
+@@ -194,6 +204,9 @@ static int keep_backup(const char *fname
  #ifdef SUPPORT_ACLS
        sx.acc_acl = sx.def_acl = NULL;
  #endif
@@ -87,7 +87,7 @@ TODO:
  
        if (!(file = make_file(fname, NULL, NULL, 0, NO_FILTERS)))
                return 1; /* the file could have disappeared */
-@@ -211,6 +224,12 @@ static int keep_backup(const char *fname
+@@ -209,6 +222,12 @@ static int keep_backup(const char *fname
                cache_acl(file, &sx);
        }
  #endif
@@ -153,7 +153,7 @@ TODO:
  extern int preserve_links;
  extern int preserve_hard_links;
  extern int preserve_devices;
-@@ -738,6 +739,10 @@ static struct file_struct *recv_file_ent
+@@ -745,6 +746,10 @@ static struct file_struct *recv_file_ent
        if (preserve_acls)
                receive_acl(file, f);
  #endif
@@ -164,7 +164,7 @@ TODO:
  
        return file;
  }
-@@ -991,7 +996,7 @@ static struct file_struct *send_file_nam
+@@ -1006,7 +1011,7 @@ static struct file_struct *send_file_nam
                                          unsigned short flags)
  {
        struct file_struct *file;
@@ -173,7 +173,7 @@ TODO:
        statx sx;
  #endif
  
-@@ -1011,6 +1016,13 @@ static struct file_struct *send_file_nam
+@@ -1026,6 +1031,13 @@ static struct file_struct *send_file_nam
                        return NULL;
        }
  #endif
@@ -187,7 +187,7 @@ TODO:
  
        maybe_emit_filelist_progress(flist->count + flist_count_offset);
  
-@@ -1021,6 +1033,10 @@ static struct file_struct *send_file_nam
+@@ -1036,6 +1048,10 @@ static struct file_struct *send_file_nam
        if (preserve_acls && f >= 0)
                send_acl(&sx, f);
  #endif
@@ -453,11 +453,11 @@ TODO:
                default:
                        /* A large opt value means that set_refuse_options()
 @@ -1255,6 +1276,8 @@ int parse_arguments(int *argc, const cha
-               preserve_gid = flist_extra_ndx++;
+               preserve_gid = ++flist_extra_cnt;
        if (preserve_acls)
-               preserve_acls = flist_extra_ndx++;
+               preserve_acls = ++flist_extra_cnt;
 +      if (preserve_xattrs)
-+              preserve_xattrs = flist_extra_ndx++;
++              preserve_xattrs = ++flist_extra_cnt;
  
        *argv = poptGetArgs(pc);
        *argc = count_args(*argv);
@@ -495,7 +495,7 @@ TODO:
         * will enable owner-writability using chmod, if necessary.
 --- old/rsync.h
 +++ new/rsync.h
-@@ -503,6 +503,10 @@ struct idev {
+@@ -504,6 +504,10 @@ struct idev {
  #define ACLS_NEED_MASK 1
  #endif
  
@@ -506,15 +506,15 @@ TODO:
  #define GID_NONE ((gid_t)-1)
  
  #define HL_CHECK_MASTER       0
-@@ -549,6 +553,7 @@ union flist_extras {
- #define F_UID(f) FLIST_EXTRA(f, preserve_uid).uid
- #define F_GID(f) FLIST_EXTRA(f, preserve_gid).gid
- #define F_ACL(f) FLIST_EXTRA(f, preserve_acls).num
-+#define F_XATTR(f) FLIST_EXTRA(f, preserve_xattrs).num
+@@ -560,6 +564,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
++#define F_XATTR(f) REQ_EXTRA(f, preserve_xattrs)->unum
  
  /* These are per-entry optional and mutally exclusive: */
- #define F_IDEV(f) FLIST_EXTRA(f, flist_extra_ndx).idev
-@@ -712,6 +717,9 @@ typedef struct {
+ #define F_IDEV(f)  OPT_EXTRA(f, LEN64_BUMP(f))->idev
+@@ -734,6 +739,9 @@ typedef struct {
      struct rsync_acl *acc_acl; /* access ACL */
      struct rsync_acl *def_acl; /* default ACL */
  #endif