On 3/10/22 11:39, Pádraig Brady wrote:
The changes are a net improvement I think since fewer interfaces are used. I would remove the AT_NO_AUTOMOUNT parameters to fstatat() though, since they're redundant it seems, and would only result in confusion if the patch is applied to remove that flag from the fstatat(2) man page.
OK, thanks, I installed the attached to do that.
From 51a5361a285783dd1bdc418bdad043069322d951 Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Thu, 10 Mar 2022 13:07:53 -0800 Subject: [PATCH] fts: revert change to use AT_NO_AUTOMOUNT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 | 7 +++++++ NEWS | 3 +-- lib/fts.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 294f6286f3..7713294982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-03-10 Paul Eggert <egg...@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 <egg...@cs.ucla.edu> 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; -- 2.35.1