Fixed failing hunks.
[rsync/rsync-patches.git] / flags.diff
index a885d7e..5e5f419 100644 (file)
@@ -259,7 +259,7 @@ Modified from a patch that was written by Rolf Grossmann:
        if (inplace) {
                if (verbose > 2)
                        rprintf(FINFO, "finishing %s\n", fname);
-@@ -305,3 +323,27 @@ const char *who_am_i(void)
+@@ -305,3 +323,21 @@ const char *who_am_i(void)
                return am_server ? "server" : "client";
        return am_sender ? "sender" : am_generator ? "generator" : "receiver";
  }
@@ -270,18 +270,12 @@ Modified from a patch that was written by Rolf Grossmann:
 +{
 +#define NOCHANGEBITS    (UF_IMMUTABLE | UF_APPEND | UF_NOUNLINK | SF_IMMUTABLE | SF_APPEND | SF_NOUNLINK)
 +      STRUCT_STAT stb;
-+      int failed;
 +
 +      if (dry_run)
 +              return;
 +
 +      /* XXX get rid of this extra stat() */
-+#ifdef SUPPORT_LINKS
-+      failed = do_lstat(fname, &stb);
-+#else
-+      failed = do_stat(fname, &stb);
-+#endif
-+      if (failed)
++      if (do_lstat(fname, &stb) < 0)
 +              return;
 +      if (stb.st_flags & NOCHANGEBITS)
 +              do_chflags(fname, stb.st_flags & ~NOCHANGEBITS);
@@ -297,7 +291,18 @@ Modified from a patch that was written by Rolf Grossmann:
  
  /* These flags are used in the live flist data. */
  
-@@ -519,6 +520,9 @@ struct file_struct {
+@@ -337,6 +338,10 @@ enum msgcode {
+ #define schar char
+ #endif
++#ifdef HAVE_CHFLAGS
++#define SUPPORT_FLAGS 1
++#endif
++
+ /* 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. */
+@@ -519,6 +524,9 @@ struct file_struct {
                struct hlink *links;
        } link_u;
        time_t modtime;
@@ -307,16 +312,6 @@ Modified from a patch that was written by Rolf Grossmann:
        uid_t uid;
        gid_t gid;
        mode_t mode;
-@@ -702,6 +706,9 @@ extern int errno;
- #ifdef HAVE_LINK
- #define SUPPORT_HARD_LINKS 1
- #endif
-+#ifdef HAVE_CHFLAGS
-+#define SUPPORT_FLAGS 1
-+#endif
- #ifdef HAVE_SIGACTION
- #define SIGACTION(n,h) sigact.sa_handler=(h), sigaction((n),&sigact,NULL)
 --- old/rsync.yo
 +++ new/rsync.yo
 @@ -322,6 +322,7 @@ to the detailed description below for a