]> Savannah Git Hosting - gnulib.git/commitdiff
fts: revert change to use AT_NO_AUTOMOUNT
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Mar 2022 21:07:53 +0000 (13:07 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Mar 2022 21:10:14 +0000 (13:10 -0800)
* NEWS: Don’t mention AT_NO_AUTOMOUNT.
* lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as
it has no effect with fstatat.

ChangeLog
NEWS
lib/fts.c

index 294f6286f3e4adb021269492041804b369f63fc2..7713294982282cf965f0ff25320e515bf2b88bda 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-03-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       fts: revert change to use AT_NO_AUTOMOUNT
+       * NEWS: Don’t mention AT_NO_AUTOMOUNT.
+       * lib/fts.c (fts_stat): Don’t use AT_NO_AUTOMOUNT, as
+       it has no effect with fstatat.
+
 2022-03-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        statat: now obsolete
diff --git a/NEWS b/NEWS
index 8f90d8e9589783755c20b7760023df6ed4a7b2f8..1a1c21970a44fbfb46b7ebecfd20a0b1e8b260dd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -66,8 +66,7 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
-2022-03-09  statat          This module is deprecated.  Use fstatat instead,
-                            to specify whether you want AT_NO_AUTOMOUNT.
+2022-03-09  statat          This module is deprecated.  Use fstatat instead.
 
 2022-01-05  stack           This module now uses idx_t instead of size_t
                             for indexes and counts.
index a1a7c09fdb1acb3c6a286c6dd4aff45e4304558d..494a63af96e3e667f8001cc41305f7a42f824cc3 100644 (file)
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1775,12 +1775,12 @@ fts_stat(FTS *sp, register FTSENT *p, bool follow)
          * a stat(2).  If that fails, check for a non-existent symlink.  If
          * fail, set the errno from the stat call.
          */
-        int flags = (follow ? 0 : AT_SYMLINK_NOFOLLOW) | AT_NO_AUTOMOUNT;
+        int flags = follow ? 0 : AT_SYMLINK_NOFOLLOW;
         if (fstatat (sp->fts_cwd_fd, p->fts_accpath, sbp, flags) < 0)
           {
             if (follow && errno == ENOENT
                 && 0 <= fstatat (sp->fts_cwd_fd, p->fts_accpath, sbp,
-                                 AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT))
+                                 AT_SYMLINK_NOFOLLOW))
               {
                 __set_errno (0);
                 return FTS_SLNONE;