The patches for 3.0.3pre2.
[rsync/rsync-patches.git] / crtimes.diff
index 1d50bc9..2fa2c15 100644 (file)
@@ -48,7 +48,7 @@ diff --git a/flist.c b/flist.c
  extern int relative_paths;
  extern int implied_dirs;
  extern int file_extra_cnt;
-@@ -385,7 +386,7 @@ int change_pathname(struct file_struct *file, const char *dir, int dirlen)
+@@ -389,7 +390,7 @@ int change_pathname(struct file_struct *file, const char *dir, int dirlen)
  
  static void send_file_entry(int f, const char *fname, struct file_struct *file, int ndx, int first_ndx)
  {
@@ -57,7 +57,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -470,6 +471,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -474,6 +475,13 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                xflags |= XMIT_SAME_TIME;
        else
                modtime = file->modtime;
@@ -71,7 +71,7 @@ diff --git a/flist.c b/flist.c
  
  #ifdef SUPPORT_HARD_LINKS
        if (tmp_dev != 0) {
-@@ -539,6 +547,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -543,6 +551,8 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
                else
                        write_int(f, modtime);
        }
@@ -80,7 +80,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                write_int(f, to_wire_mode(mode));
  #ifdef SUPPORT_FILEFLAGS
-@@ -631,7 +641,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
+@@ -635,7 +645,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file,
  static struct file_struct *recv_file_entry(struct file_list *flist,
                                           int xflags, int f)
  {
@@ -89,7 +89,7 @@ diff --git a/flist.c b/flist.c
        static mode_t mode;
  #ifdef SUPPORT_FILEFLAGS
        static uint32 fileflags;
-@@ -766,6 +776,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -770,6 +780,19 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                } else
                        modtime = read_int(f);
        }
@@ -109,7 +109,7 @@ diff --git a/flist.c b/flist.c
        if (!(xflags & XMIT_SAME_MODE))
                mode = from_wire_mode(read_int(f));
  
-@@ -905,6 +928,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
+@@ -909,6 +932,8 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
                F_GROUP(file) = gid;
                file->flags |= gid_flags;
        }
@@ -118,7 +118,7 @@ diff --git a/flist.c b/flist.c
        if (unsort_ndx)
                F_NDX(file) = flist->used + flist->ndx_start;
  
-@@ -1257,6 +1282,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
+@@ -1261,6 +1286,8 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
                F_OWNER(file) = st.st_uid;
        if (gid_ndx) /* Check gid_ndx instead of preserve_gid for del support */
                F_GROUP(file) = st.st_gid;
@@ -309,7 +309,7 @@ diff --git a/rsync.c b/rsync.c
  
        change_uid = am_root && uid_ndx && sxp->st.st_uid != (uid_t)F_OWNER(file);
        change_gid = gid_ndx && !(file->flags & FLAG_SKIP_GROUP)
-@@ -615,7 +623,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -618,7 +626,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
        /* Change permissions before putting the file into place. */
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
                       ATTRS_DELAY_IMMUTABLE
@@ -318,7 +318,7 @@ diff --git a/rsync.c b/rsync.c
  
        /* move tmp file over real file */
        if (verbose > 2)
-@@ -646,7 +654,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
+@@ -649,7 +657,7 @@ int finish_transfer(const char *fname, const char *fnametmp,
  
    do_set_file_attrs:
        set_file_attrs(fnametmp, file, NULL, fnamecmp,
@@ -390,7 +390,7 @@ diff --git a/rsync.yo b/rsync.yo
       --super                 receiver attempts super-user activities
       --fake-super            store/recover privileged attrs using xattrs
   -S, --sparse                handle sparse files efficiently
-@@ -1022,6 +1023,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
+@@ -1028,6 +1029,9 @@ it is preserving modification times (see bf(--times)).  If NFS is sharing
  the directories on the receiving side, it is a good idea to use bf(-O).
  This option is inferred if you use bf(--backup) without bf(--backup-dir).
  
@@ -400,7 +400,7 @@ diff --git a/rsync.yo b/rsync.yo
  dit(bf(--super)) This tells the receiving side to attempt super-user
  activities even if the receiving rsync wasn't run by the super-user.  These
  activities include: preserving users via the bf(--owner) option, preserving
-@@ -1674,7 +1678,7 @@ with older versions of rsync, but that also turns on the output of other
+@@ -1680,7 +1684,7 @@ with older versions of rsync, but that also turns on the output of other
  verbose messages).
  
  The "%i" escape has a cryptic output that is 11 letters long.  The general
@@ -409,7 +409,7 @@ diff --git a/rsync.yo b/rsync.yo
  type of update being done, bf(X) is replaced by the file-type, and the
  other letters represent attributes that may be output if they are being
  modified.
-@@ -1733,6 +1737,8 @@ quote(itemization(
+@@ -1739,6 +1743,8 @@ quote(itemization(
    it() The bf(f) means that the fileflags information changed.
    it() The bf(a) means that the ACL information changed.
    it() The bf(x) means that the extended attribute information changed.
@@ -515,7 +515,7 @@ diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
 diff --git a/tls.c b/tls.c
 --- a/tls.c
 +++ b/tls.c
-@@ -105,6 +105,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
+@@ -107,6 +107,8 @@ static int stat_xattr(const char *fname, STRUCT_STAT *fst)
  
  #endif
  
@@ -524,7 +524,7 @@ diff --git a/tls.c b/tls.c
  static void failed(char const *what, char const *where)
  {
        fprintf(stderr, PROGRAM ": %s %s: %s\n",
-@@ -112,16 +114,36 @@ static void failed(char const *what, char const *where)
+@@ -114,16 +116,36 @@ static void failed(char const *what, char const *where)
        exit(1);
  }
  
@@ -563,7 +563,7 @@ diff --git a/tls.c b/tls.c
  #ifdef SUPPORT_XATTRS
        if (am_root < 0)
                stat_xattr(fname, &buf);
-@@ -154,19 +176,11 @@ static void list_file(const char *fname)
+@@ -158,19 +180,11 @@ static void list_file(const char *fname)
  
        permstring(permbuf, buf.st_mode);
  
@@ -588,7 +588,7 @@ diff --git a/tls.c b/tls.c
  
        /* TODO: Perhaps escape special characters in fname? */
  
-@@ -177,13 +191,14 @@ static void list_file(const char *fname)
+@@ -181,13 +195,14 @@ static void list_file(const char *fname)
                    (long)minor(buf.st_rdev));
        } else /* NB: use double for size since it might not fit in a long. */
                printf("%12.0f", (double)buf.st_size);
@@ -602,14 +602,14 @@ diff --git a/tls.c b/tls.c
  static struct poptOption long_options[] = {
    /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */
 +  {"crtimes",         'N', POPT_ARG_NONE,   &display_crtimes, 0, 0, 0},
+   {"link-times",      'l', POPT_ARG_NONE,   &link_times, 0, 0, 0 },
+   {"link-owner",      'L', POPT_ARG_NONE,   &link_owner, 0, 0, 0 },
  #ifdef SUPPORT_XATTRS
-   {"fake-super",      'f', POPT_ARG_VAL,    &am_root, -1, 0, 0 },
- #endif
-@@ -197,6 +212,7 @@ static void tls_usage(int ret)
+@@ -203,6 +218,7 @@ static void tls_usage(int ret)
    fprintf(F,"usage: " PROGRAM " [OPTIONS] FILE ...\n");
    fprintf(F,"Trivial file listing program for portably checking rsync\n");
    fprintf(F,"\nOptions:\n");
 +  fprintf(F," -N, --crtimes               display create times (newness)\n");
+   fprintf(F," -l, --link-times            display the time on a symlink\n");
+   fprintf(F," -L, --link-owner            display the owner+group on a symlink\n");
  #ifdef SUPPORT_XATTRS
-   fprintf(F," -f, --fake-super            display attributes including fake-super xattrs\n");
- #endif