Change --set-notime to --open-noatime.
authorWayne Davison <wayne@opencoder.net>
Thu, 23 Apr 2020 21:27:44 +0000 (14:27 -0700)
committerWayne Davison <wayne@opencoder.net>
Thu, 23 Apr 2020 21:32:26 +0000 (14:32 -0700)
NEWS
options.c
rsync.yo
syscall.c
t_stub.c
tls.c
trimslash.c

diff --git a/NEWS b/NEWS
index e3323c61d1c43de06d751bc4384b4eae7050c45b..cd9a1cfbe6d64a42984b4a976dd8b53c33320f5d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -32,7 +32,7 @@ Changes since 3.1.3:
 
     - Improved the --atimes patch and promoted it to be in the release.
 
-    - Added --set-noatime option to open files using O_NOATIME.
+    - Added --open-noatime option to open files using O_NOATIME.
 
     - Improved the --write-devices patch and promoted it to be in the release.
 
index 95ec6da0c64207c6d1941f5be79955900546ae7b..2319b14d161129fe303e1cbf06b3a86b4e7a0985 100644 (file)
--- a/options.c
+++ b/options.c
@@ -65,7 +65,7 @@ int preserve_gid = 0;
 int preserve_times = 0;
 int preserve_atimes = 0;
 int update_only = 0;
-int set_noatime = 0;
+int open_noatime = 0;
 int cvs_exclude = 0;
 int dry_run = 0;
 int do_xfers = 1;
@@ -714,7 +714,7 @@ void usage(enum logcode F)
   rprintf(F," -D                          same as --devices --specials\n");
   rprintf(F," -t, --times                 preserve modification times\n");
   rprintf(F," -U, --atimes                preserve access (last-used) times\n");
-  rprintf(F,"     --set-noatime           avoid changing the atime on accessed files\n");
+  rprintf(F,"     --open-noatime          avoid changing the atime on opened files\n");
   rprintf(F," -O, --omit-dir-times        omit directories from --times\n");
   rprintf(F," -J, --omit-link-times       omit symlinks from --times\n");
   rprintf(F,"     --super                 receiver attempts super-user activities\n");
@@ -879,8 +879,8 @@ static struct poptOption long_options[] = {
   {"atimes",          'U', POPT_ARG_NONE,   0, 'U', 0, 0 },
   {"no-atimes",        0,  POPT_ARG_VAL,    &preserve_atimes, 0, 0, 0 },
   {"no-U",             0,  POPT_ARG_VAL,    &preserve_atimes, 0, 0, 0 },
-  {"set-noatime",      0,  POPT_ARG_VAL,    &set_noatime, 1, 0, 0 },
-  {"no-set-noatime",   0,  POPT_ARG_VAL,    &set_noatime, 0, 0, 0 },
+  {"open-noatime",     0,  POPT_ARG_VAL,    &open_noatime, 1, 0, 0 },
+  {"no-open-noatime",  0,  POPT_ARG_VAL,    &open_noatime, 0, 0, 0 },
   {"omit-dir-times",  'O', POPT_ARG_VAL,    &omit_dir_times, 1, 0, 0 },
   {"no-omit-dir-times",0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
   {"no-O",             0,  POPT_ARG_VAL,    &omit_dir_times, 0, 0, 0 },
@@ -1554,7 +1554,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
 
                case 'U':
                        if (++preserve_atimes > 1)
-                           set_noatime = 1;
+                           open_noatime = 1;
                        break;
 
                case 'v':
@@ -2850,8 +2850,8 @@ void server_options(char **args, int *argc_p)
        if (preallocate_files && am_sender)
                args[ac++] = "--preallocate";
 
-       if (set_noatime && preserve_atimes <= 1)
-               args[ac++] = "--set-noatime";
+       if (open_noatime && preserve_atimes <= 1)
+               args[ac++] = "--open-noatime";
 
        if (ac > MAX_SERVER_ARGS) { /* Not possible... */
                rprintf(FERROR, "argc overflow in server_options().\n");
index 443c37daaaba96bb9fb3158644c3d70a5599800d..1fd78b63315c58290b7b6c87ef54a1be1ed1d6b5 100644 (file)
--- a/rsync.yo
+++ b/rsync.yo
@@ -379,7 +379,7 @@ to the detailed description below for a complete description.  verb(
  -D                          same as --devices --specials
  -t, --times                 preserve modification times
  -U, --atimes                preserve access (use) times
-     --set-noatime           avoid changing the atime on accessed files
+     --open-noatime          avoid changing the atime on opened files
  -O, --omit-dir-times        omit directories from --times
  -J, --omit-link-times       omit symlinks from --times
      --super                 receiver attempts super-user activities
@@ -1245,16 +1245,16 @@ if the files haven't actually changed, you're much better off using bf(-t)).
 dit(bf(-U, --atimes)) This tells rsync to set the access (use) times of the
 destination files to the same value as the source files.
 
-If repeated, it also sets the bf(--set-noatime) option, which can help you
+If repeated, it also sets the bf(--open-noatime) option, which can help you
 to make the sending and receiving systems have the same access times on the
 transferred files without needing to run rsync an extra time after a file is
 transferred.
 
 Note that some older rsync versions (prior to 3.1.4) may have been built with
-a pre-release bf(--atimes) patch that does not imply bf(--set-noatime) when
+a pre-release bf(--atimes) patch that does not imply bf(--open-noatime) when
 this option is repeated.
 
-dit(bf(--set-noatime)) This tells rsync to open files with the O_NOATIME
+dit(bf(--open-noatime)) This tells rsync to open files with the O_NOATIME
 flag (on systems that support it) to avoid changing the access time of the
 files that are being transferred. If your OS does not support the O_NOATIME
 flag then rsync will silently ignore this option. Note also that some
index 927f71d6b461141fde15b3e89c12400f006c0593..35caa07dc08b492313a07b9498104858d12ef711 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -42,7 +42,7 @@ extern int inplace;
 extern int preallocate_files;
 extern int preserve_perms;
 extern int preserve_executability;
-extern int set_noatime;
+extern int open_noatime;
 
 #ifndef S_BLKSIZE
 # if defined hpux || defined __hpux__ || defined __hpux
@@ -204,7 +204,7 @@ int do_open(const char *pathname, int flags, mode_t mode)
        }
 
 #ifdef O_NOATIME
-       if (set_noatime)
+       if (open_noatime)
                flags |= O_NOATIME;
 #endif
 
index cfe8727accc2995e96cb0c2eb1b36744b0a742e3..6f01a24da3251cb83f56ab3cba8bd9b6ada260f1 100644 (file)
--- a/t_stub.c
+++ b/t_stub.c
@@ -31,7 +31,7 @@ int module_dirlen = 0;
 int preserve_acls = 0;
 int preserve_times = 0;
 int preserve_xattrs = 0;
-int set_noatime = 0;
+int open_noatime = 0;
 char *partial_dir;
 char *module_dir;
 filter_rule_list daemon_filter_list;
diff --git a/tls.c b/tls.c
index 9e15c96cf46c667ee1c1bbca40cfe4ac05976bd4..00fac8b58c7114f307bd3a6cdad583aed991d0a2 100644 (file)
--- a/tls.c
+++ b/tls.c
@@ -52,7 +52,7 @@ int nsec_times = 0;
 int preserve_perms = 0;
 int preserve_executability = 0;
 int preallocate_files = 0;
-int set_noatime = 0;
+int open_noatime = 0;
 int inplace = 0;
 
 #ifdef SUPPORT_XATTRS
index 2891279eef6846e73e3f8e2b449ea91f0e454294..004351c2e92e40113b64d44c31975e3755f34710 100644 (file)
@@ -29,7 +29,7 @@ int list_only = 0;
 int preserve_perms = 0;
 int preserve_executability = 0;
 int preallocate_files = 0;
-int set_noatime = 0;
+int open_noatime = 0;
 int inplace = 0;
 
 int