Updated the opening comments to mention how to apply the patch
[rsync/rsync-patches.git] / flags.diff
index 74864d8..dbbeea4 100644 (file)
@@ -1,8 +1,9 @@
 This patch provides --flags, which preserves the st_flags field.
 Modified from a patch that was written by Rolf Grossmann.
 
-After applying this patch, run these commands for a successful build:
+To use this patch, run these commands for a successful build:
 
+    patch -p1 <patches/flags.diff
     ./prepare-source
     ./configure
     make
@@ -196,7 +197,7 @@ After applying this patch, run these commands for a successful build:
                                return;
                        if (!S_ISLNK(st.st_mode))
                                statret = -1;
-@@ -1060,7 +1076,7 @@ static void recv_generator(char *fname, 
+@@ -1063,7 +1079,7 @@ static void recv_generator(char *fname, 
                 || (st.st_mode & ~CHMOD_BITS) != (file->mode & ~CHMOD_BITS)
                 || st.st_rdev != file->u.rdev) {
                        if (statret == 0
@@ -205,7 +206,7 @@ After applying this patch, run these commands for a successful build:
                                return;
                        if (preserve_hard_links && file->link_u.links
                            && hard_link_check(file, ndx, fname, -1, &st,
-@@ -1145,7 +1161,7 @@ static void recv_generator(char *fname, 
+@@ -1148,7 +1164,7 @@ static void recv_generator(char *fname, 
        fnamecmp_type = FNAMECMP_FNAME;
  
        if (statret == 0 && !S_ISREG(st.st_mode)) {
@@ -224,7 +225,7 @@ After applying this patch, run these commands for a successful build:
  int preserve_executability = 0;
  int preserve_devices = 0;
  int preserve_specials = 0;
-@@ -200,6 +201,7 @@ static void print_rsync_version(enum log
+@@ -201,6 +202,7 @@ static void print_rsync_version(enum log
        char const *hardlinks = "no ";
        char const *links = "no ";
        char const *ipv6 = "no ";
@@ -232,7 +233,7 @@ After applying this patch, run these commands for a successful build:
        STRUCT_STAT *dumstat;
  
  #ifdef HAVE_SOCKETPAIR
-@@ -222,6 +224,10 @@ static void print_rsync_version(enum log
+@@ -223,6 +225,10 @@ static void print_rsync_version(enum log
        ipv6 = "";
  #endif
  
@@ -243,7 +244,7 @@ After applying this patch, run these commands for a successful build:
        rprintf(f, "%s  version %s  protocol version %d\n",
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
-@@ -234,9 +240,9 @@ static void print_rsync_version(enum log
+@@ -235,9 +241,9 @@ static void print_rsync_version(enum log
        /* Note that this field may not have type ino_t.  It depends
         * on the complicated interaction between largefile feature
         * macros. */
@@ -255,7 +256,7 @@ After applying this patch, run these commands for a successful build:
                (int) (sizeof dumstat->st_ino * 8),
                (int) (sizeof (int64) * 8));
  #ifdef MAINTAINER_MODE
-@@ -302,6 +308,7 @@ void usage(enum logcode F)
+@@ -304,6 +310,7 @@ void usage(enum logcode F)
    rprintf(F," -K, --keep-dirlinks         treat symlinked dir on receiver as dir\n");
    rprintf(F," -H, --hard-links            preserve hard links\n");
    rprintf(F," -p, --perms                 preserve permissions\n");
@@ -263,7 +264,7 @@ After applying this patch, run these commands for a successful build:
    rprintf(F," -E, --executability         preserve the file's executability\n");
    rprintf(F,"     --chmod=CHMOD           affect file and/or directory permissions\n");
    rprintf(F," -o, --owner                 preserve owner (super-user only)\n");
-@@ -420,6 +427,8 @@ static struct poptOption long_options[] 
+@@ -424,6 +431,8 @@ static struct poptOption long_options[] 
    {"perms",           'p', POPT_ARG_VAL,    &preserve_perms, 1, 0, 0 },
    {"no-perms",         0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
    {"no-p",             0,  POPT_ARG_VAL,    &preserve_perms, 0, 0, 0 },
@@ -272,7 +273,7 @@ After applying this patch, run these commands for a successful build:
    {"executability",   'E', POPT_ARG_NONE,   &preserve_executability, 0, 0, 0 },
    {"times",           't', POPT_ARG_VAL,    &preserve_times, 1, 0, 0 },
    {"no-times",         0,  POPT_ARG_VAL,    &preserve_times, 0, 0, 0 },
-@@ -1124,6 +1133,15 @@ int parse_arguments(int *argc, const cha
+@@ -1128,6 +1137,15 @@ int parse_arguments(int *argc, const cha
        }
  #endif
  
@@ -288,7 +289,7 @@ After applying this patch, run these commands for a successful build:
        if (write_batch && read_batch) {
                snprintf(err_buf, sizeof err_buf,
                        "--write-batch and --read-batch can not be used together\n");
-@@ -1577,6 +1595,9 @@ void server_options(char **args,int *arg
+@@ -1581,6 +1599,9 @@ void server_options(char **args,int *arg
        if (xfer_dirs && !recurse && delete_mode && am_sender)
                args[ac++] = "--no-r";
  
@@ -424,7 +425,7 @@ After applying this patch, run these commands for a successful build:
        mode_t mode;
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -320,6 +320,7 @@ to the detailed description below for a 
+@@ -321,6 +321,7 @@ to the detailed description below for a 
   -K, --keep-dirlinks         treat symlinked dir on receiver as dir
   -H, --hard-links            preserve hard links
   -p, --perms                 preserve permissions
@@ -432,7 +433,7 @@ After applying this patch, run these commands for a successful build:
   -E, --executability         preserve executability
       --chmod=CHMOD           affect file and/or directory permissions
   -o, --owner                 preserve owner (super-user only)
-@@ -501,7 +502,9 @@ specified, in which case bf(-r) is not i
+@@ -509,7 +510,9 @@ specified, in which case bf(-r) is not i
  
  Note that bf(-a) bf(does not preserve hardlinks), because
  finding multiply-linked files is expensive.  You must separately
@@ -443,7 +444,7 @@ After applying this patch, run these commands for a successful build:
  
  dit(--no-OPTION) You may turn off one or more implied options by prefixing
  the option name with "no-".  Not all options may be prefixed with a "no-":
-@@ -796,6 +799,13 @@ quote(itemization(
+@@ -804,6 +807,13 @@ quote(itemization(
  
  If bf(--perms) is enabled, this option is ignored.