Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Mon, 18 Dec 2006 07:30:55 +0000 (07:30 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 18 Dec 2006 07:30:55 +0000 (07:30 +0000)
acls.diff
atimes.diff
detect-renamed.diff
flags.diff
xattrs.diff

index 67d5ca4055cca0db86cdae72fd6d421683e576ce..c86aa66928fcb509277322342c7b5622beb42416 100644 (file)
--- a/acls.diff
+++ b/acls.diff
@@ -1220,18 +1220,18 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                        robust_unlink(fname); /* Just in case... */
 --- old/compat.c
 +++ new/compat.c
-@@ -48,6 +48,8 @@ void setup_protocol(int f_out,int f_in)
-               preserve_uid = ++flist_extra_cnt;
+@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in)
+               preserve_uid = ++file_extra_cnt;
        if (preserve_gid)
-               preserve_gid = ++flist_extra_cnt;
+               preserve_gid = ++file_extra_cnt;
 +      if (preserve_acls && !am_sender)
-+              preserve_acls = ++flist_extra_cnt;
++              preserve_acls = ++file_extra_cnt;
  
        if (remote_protocol == 0) {
                if (!read_batch)
 --- old/configure.in
 +++ new/configure.in
-@@ -537,6 +537,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
+@@ -542,6 +542,11 @@ if test x"$ac_cv_func_strcasecmp" = x"no
      AC_CHECK_LIB(resolv, strcasecmp)
  fi
  
@@ -1243,7 +1243,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  dnl At the moment we don't test for a broken memcmp(), because all we
  dnl need to do is test for equality, not comparison, and it seems that
  dnl every platform has a memcmp that can do at least that.
-@@ -801,6 +806,78 @@ AC_SUBST(OBJ_RESTORE)
+@@ -806,6 +811,78 @@ AC_SUBST(OBJ_RESTORE)
  AC_SUBST(CC_SHOBJ_FLAG)
  AC_SUBST(BUILD_POPT)
  
@@ -1367,7 +1367,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  }
  
 @@ -1068,6 +1082,9 @@ static struct file_struct *send_file_nam
-                                         unsigned short flags)
+                                         int flags)
  {
        struct file_struct *file;
 +#ifdef SUPPORT_ACLS
@@ -2157,7 +2157,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  extern int make_backups;
  extern int protocol_version;
  extern int remove_source_files;
-@@ -269,15 +270,19 @@ void match_hard_links(void)
+@@ -268,15 +269,19 @@ void match_hard_links(void)
  }
  
  static int maybe_hard_link(struct file_struct *file, int ndx,
@@ -2181,7 +2181,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                        ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS,
                                        0, "");
                        }
-@@ -298,7 +303,11 @@ static int maybe_hard_link(struct file_s
+@@ -297,7 +302,11 @@ static int maybe_hard_link(struct file_s
  
        if (hard_link_one(file, fname, oldname, 0)) {
                if (itemizing) {
@@ -2194,7 +2194,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                ITEM_LOCAL_CHANGE | ITEM_XNAME_FOLLOWS, 0,
                                realname);
                }
-@@ -312,7 +321,7 @@ static int maybe_hard_link(struct file_s
+@@ -311,7 +320,7 @@ static int maybe_hard_link(struct file_s
  /* Only called if FLAG_HLINKED is set and FLAG_HLINK_FIRST is not.  Returns:
   * 0 = process the file, 1 = skip the file, -1 = error occurred. */
  int hard_link_check(struct file_struct *file, int ndx, const char *fname,
@@ -2203,7 +2203,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                    enum logcode code)
  {
        STRUCT_STAT prev_st;
-@@ -363,18 +372,20 @@ int hard_link_check(struct file_struct *
+@@ -362,18 +371,20 @@ int hard_link_check(struct file_struct *
        if (statret < 0 && basis_dir[0] != NULL) {
                /* If we match an alt-dest item, we don't output this as a change. */
                char cmpbuf[MAXPATHLEN];
@@ -2229,7 +2229,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                                if (verbose < 2 || !stdout_format_has_i) {
                                        itemizing = 0;
                                        code = FNONE;
-@@ -383,16 +394,36 @@ int hard_link_check(struct file_struct *
+@@ -382,16 +393,36 @@ int hard_link_check(struct file_struct *
                                }
                                break;
                        }
@@ -2270,7 +2270,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
                            realname, itemizing, code) < 0)
                return -1;
  
-@@ -427,7 +458,8 @@ void finish_hard_link(struct file_struct
+@@ -426,7 +457,8 @@ void finish_hard_link(struct file_struct
                      STRUCT_STAT *stp, int itemizing, enum logcode code,
                      int alt_dest)
  {
@@ -2280,7 +2280,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
        char alt_name[MAXPATHLEN], *prev_name;
        const char *our_name;
        int prev_statret, ndx, prev_ndx = F_HL_PREV(file);
-@@ -451,14 +483,24 @@ void finish_hard_link(struct file_struct
+@@ -450,14 +482,24 @@ void finish_hard_link(struct file_struct
        } else
                our_name = fname;
  
@@ -5955,7 +5955,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
 --- old/rsync.h
 +++ new/rsync.h
-@@ -503,6 +503,14 @@ struct idev_node {
+@@ -532,6 +532,14 @@ struct idev_node {
  #define IN_LOOPBACKNET 127
  #endif
  
@@ -5970,15 +5970,15 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #define GID_NONE ((gid_t)-1)
  
  union file_extras {
-@@ -522,6 +530,7 @@ struct file_struct {
- extern int flist_extra_cnt;
+@@ -551,6 +559,7 @@ struct file_struct {
+ extern int file_extra_cnt;
  extern int preserve_uid;
  extern int preserve_gid;
 +extern int preserve_acls;
  
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
-@@ -554,10 +563,12 @@ extern int preserve_gid;
+@@ -583,10 +592,12 @@ extern int preserve_gid;
  /* When the associated option is on, all entries will have these present: */
  #define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum
@@ -5991,7 +5991,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  
  /* This optional item might follow an F_HL_*() item.
   * (Note: a device doesn't need to check LEN64_BUMP(f).) */
-@@ -693,6 +704,17 @@ struct stats {
+@@ -722,6 +733,17 @@ struct stats {
  
  struct chmod_mode_struct;
  
@@ -6009,7 +6009,7 @@ latest ACL-enabling patch to send files to an older ACL-enabled rsync.
  #include "byteorder.h"
  #include "lib/mdfour.h"
  #include "lib/wildmatch.h"
-@@ -711,6 +733,16 @@ struct chmod_mode_struct;
+@@ -740,6 +762,16 @@ struct chmod_mode_struct;
  #define NORETURN __attribute__((__noreturn__))
  #endif
  
index 377fc0f8b99f07712389e1252aa4b1f0f51fd706..7fe98b211a111a940f258837a49179ae8412763e 100644 (file)
@@ -8,12 +8,12 @@ To use this patch, run these commands for a successful build:
 
 --- old/compat.c
 +++ new/compat.c
-@@ -48,6 +48,8 @@ void setup_protocol(int f_out,int f_in)
-               preserve_uid = ++flist_extra_cnt;
+@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in)
+               preserve_uid = ++file_extra_cnt;
        if (preserve_gid)
-               preserve_gid = ++flist_extra_cnt;
+               preserve_gid = ++file_extra_cnt;
 +      if (preserve_atimes)
-+              preserve_atimes = ++flist_extra_cnt;
++              preserve_atimes = ++file_extra_cnt;
  
        if (remote_protocol == 0) {
                if (!read_batch)
@@ -26,7 +26,7 @@ To use this patch, run these commands for a successful build:
 +extern int preserve_atimes;
  extern int relative_paths;
  extern int implied_dirs;
- extern int flist_extra_cnt;
+ extern int file_extra_cnt;
 @@ -137,6 +138,7 @@ void show_flist_stats(void)
  static void list_file_entry(struct file_struct *f)
  {
@@ -54,9 +54,9 @@ To use this patch, run these commands for a successful build:
                        f_name(f, NULL));
        }
  }
-@@ -314,6 +318,7 @@ static void send_file_entry(struct file_
+@@ -313,6 +317,7 @@ void flist_expand(struct file_list *flis
+ static void send_file_entry(struct file_struct *file, int f, int ndx)
  {
-       unsigned short flags;
        static time_t modtime;
 +      static time_t atime;
        static mode_t mode;
@@ -87,7 +87,7 @@ To use this patch, run these commands for a successful build:
                        add_uid(uid);
 @@ -501,7 +515,7 @@ static void send_file_entry(struct file_
  static struct file_struct *recv_file_entry(struct file_list *flist,
-                                          unsigned short flags, int f)
+                                          int flags, int f)
  {
 -      static time_t modtime;
 +      static time_t modtime, atime;
@@ -296,15 +296,15 @@ To use this patch, run these commands for a successful build:
  
  #define FULL_FLUSH    1
  #define NORMAL_FLUSH  0
-@@ -522,6 +524,7 @@ struct file_struct {
- extern int flist_extra_cnt;
+@@ -551,6 +553,7 @@ struct file_struct {
+ extern int file_extra_cnt;
  extern int preserve_uid;
  extern int preserve_gid;
 +extern int preserve_atimes;
  
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
-@@ -554,6 +557,7 @@ extern int preserve_gid;
+@@ -583,6 +586,7 @@ extern int preserve_gid;
  /* When the associated option is on, all entries will have these present: */
  #define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum
index d700d5729b3a33603760da3a1665ba7db40a3c48..d851dd6ad4544b4fe1eb659c82a7a8f440f98180 100644 (file)
@@ -300,9 +300,9 @@ TODO:
        save_filters = push_local_filters(fname, dlen);
  
        non_perishable_cnt = 0;
-+      flist_extra_cnt += SUM_EXTRA_CNT;
++      file_extra_cnt += SUM_EXTRA_CNT;
        dirlist = get_dirlist(fname, dlen, 0);
-+      flist_extra_cnt -= SUM_EXTRA_CNT;
++      file_extra_cnt -= SUM_EXTRA_CNT;
        ret = non_perishable_cnt ? DR_NOT_EMPTY : DR_SUCCESS;
  
        if (!dirlist->count)
index 05d4b14a61ae3c896815714cdf840ffad254eeb8..5edd0bd5ef26787bf7f1c99ce27a2547a343b999 100644 (file)
@@ -12,18 +12,18 @@ TODO: fix --delete-delay to work with --flags option.
 
 --- old/compat.c
 +++ new/compat.c
-@@ -48,6 +48,8 @@ void setup_protocol(int f_out,int f_in)
-               preserve_uid = ++flist_extra_cnt;
+@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in)
+               preserve_uid = ++file_extra_cnt;
        if (preserve_gid)
-               preserve_gid = ++flist_extra_cnt;
+               preserve_gid = ++file_extra_cnt;
 +      if (preserve_fileflags)
-+              preserve_fileflags = ++flist_extra_cnt;
++              preserve_fileflags = ++file_extra_cnt;
  
        if (remote_protocol == 0) {
                if (!read_batch)
 --- old/configure.in
 +++ new/configure.in
-@@ -549,7 +549,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
+@@ -554,7 +554,7 @@ AC_CHECK_FUNCS(waitpid wait4 getcwd strd
      memmove lchown vsnprintf snprintf vasprintf asprintf setsid glob strpbrk \
      strlcat strlcpy strtol mallinfo getgroups setgroups geteuid getegid \
      setlocale setmode open64 lseek64 mkstemp64 mtrace va_copy __va_copy \
@@ -42,8 +42,8 @@ TODO: fix --delete-delay to work with --flags option.
  extern int preserve_uid;
  extern int preserve_gid;
  extern int relative_paths;
-@@ -315,6 +316,9 @@ static void send_file_entry(struct file_
-       unsigned short flags;
+@@ -314,6 +315,9 @@ static void send_file_entry(struct file_
+ {
        static time_t modtime;
        static mode_t mode;
 +#ifdef SUPPORT_FLAGS
@@ -458,8 +458,8 @@ TODO: fix --delete-delay to work with --flags option.
  
  /* These flags are used in the live flist data. */
  
-@@ -355,6 +356,10 @@ enum msgcode {
- #define schar char
+@@ -374,6 +375,10 @@ enum msgcode {
+ #endif
  #endif
  
 +#ifdef HAVE_CHFLAGS
@@ -469,15 +469,15 @@ TODO: fix --delete-delay to work with --flags option.
  /* Find a variable that is either exactly 32-bits or longer.
   * If some code depends on 32-bit truncation, it will need to
   * take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -522,6 +527,7 @@ struct file_struct {
- extern int flist_extra_cnt;
+@@ -551,6 +556,7 @@ struct file_struct {
+ extern int file_extra_cnt;
  extern int preserve_uid;
  extern int preserve_gid;
 +extern int preserve_fileflags;
  
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
-@@ -554,6 +560,7 @@ extern int preserve_gid;
+@@ -583,6 +589,7 @@ extern int preserve_gid;
  /* When the associated option is on, all entries will have these present: */
  #define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum
index b5e5262210af6d1b2417d2c240cebd090ef5cf07..4af1c382ea72fd45a4dfd875599d269d8a283d38 100644 (file)
@@ -102,18 +102,18 @@ TODO:
        if ((am_root && preserve_devices && IS_DEVICE(file->mode))
 --- old/compat.c
 +++ new/compat.c
-@@ -50,6 +50,8 @@ void setup_protocol(int f_out,int f_in)
-               preserve_gid = ++flist_extra_cnt;
+@@ -52,6 +52,8 @@ void setup_protocol(int f_out,int f_in)
+               preserve_gid = ++file_extra_cnt;
        if (preserve_acls && !am_sender)
-               preserve_acls = ++flist_extra_cnt;
+               preserve_acls = ++file_extra_cnt;
 +      if (preserve_xattrs && !am_sender)
-+              preserve_xattrs = ++flist_extra_cnt;
++              preserve_xattrs = ++file_extra_cnt;
  
        if (remote_protocol == 0) {
                if (!read_batch)
 --- old/configure.in
 +++ new/configure.in
-@@ -878,6 +878,40 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
+@@ -883,6 +883,40 @@ samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_
    AC_MSG_RESULT(no)
  )
  
@@ -176,7 +176,7 @@ TODO:
        return file;
  }
 @@ -1082,7 +1087,7 @@ static struct file_struct *send_file_nam
-                                         unsigned short flags)
+                                         int flags)
  {
        struct file_struct *file;
 -#ifdef SUPPORT_ACLS
@@ -497,7 +497,7 @@ TODO:
         * will enable owner-writability using chmod, if necessary.
 --- old/rsync.h
 +++ new/rsync.h
-@@ -511,6 +511,10 @@ struct idev_node {
+@@ -540,6 +540,10 @@ struct idev_node {
  #define ACLS_NEED_MASK 1
  #endif
  
@@ -508,7 +508,7 @@ TODO:
  #define GID_NONE ((gid_t)-1)
  
  union file_extras {
-@@ -531,6 +535,7 @@ extern int flist_extra_cnt;
+@@ -560,6 +564,7 @@ extern int file_extra_cnt;
  extern int preserve_uid;
  extern int preserve_gid;
  extern int preserve_acls;
@@ -516,7 +516,7 @@ TODO:
  
  #define FILE_STRUCT_LEN (offsetof(struct file_struct, basename))
  #define EXTRA_LEN (sizeof (union file_extras))
-@@ -564,6 +569,7 @@ extern int preserve_acls;
+@@ -593,6 +598,7 @@ extern int preserve_acls;
  #define F_UID(f) REQ_EXTRA(f, preserve_uid)->unum
  #define F_GID(f) REQ_EXTRA(f, preserve_gid)->unum
  #define F_ACL(f) REQ_EXTRA(f, preserve_acls)->unum
@@ -524,7 +524,7 @@ TODO:
  
  /* These items are per-entry optional and mutally exclusive: */
  #define F_HL_GNUM(f) OPT_EXTRA(f, LEN64_BUMP(f))->num
-@@ -739,6 +745,9 @@ typedef struct {
+@@ -768,6 +774,9 @@ typedef struct {
      struct rsync_acl *acc_acl; /* access ACL */
      struct rsync_acl *def_acl; /* default ACL */
  #endif