From: Paul Eggert Date: Thu, 10 Mar 2022 21:07:53 +0000 (-0800) Subject: fts: revert change to use AT_NO_AUTOMOUNT X-Git-Tag: v1.0~2338 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=eee9ab09d346fc7b942c7fc76ec6b185e533748f;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 294f6286f3..7713294982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-03-10 Paul Eggert + + 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 statat: now obsolete diff --git a/NEWS b/NEWS index 8f90d8e958..1a1c21970a 100644 --- 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. diff --git a/lib/fts.c b/lib/fts.c index a1a7c09fdb..494a63af96 100644 --- 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;