public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH 1/4] fts.3: note that lstat(2) may also provide fts_statp
Date: Mon, 4 Jul 2022 01:04:53 +0200	[thread overview]
Message-ID: <9e1cb4dc-921b-8a37-df1f-72b18dff5083@gmail.com> (raw)
In-Reply-To: <552ae4935239ba9240303b1802bd3c8913b564c5.1656887003.git.nabijaczleweli@nabijaczleweli.xyz>


[-- Attachment #1.1: Type: text/plain, Size: 2952 bytes --]

Hi наб!

On 7/4/22 00:23, наб wrote:
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

It seems you've been investigating about these structures.  Would you 
mind adding a new .3type page about them, maybe?

Thanks,

Alex

> ---
>   man3/fts.3 | 25 ++++++++++++++++++-------
>   1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/man3/fts.3 b/man3/fts.3
> index 495ae1d8b..bf3e075f2 100644
> --- a/man3/fts.3
> +++ b/man3/fts.3
> @@ -104,7 +104,7 @@ typedef struct _ftsent {
>       struct _ftsent *fts_parent;   /* parent directory */
>       struct _ftsent *fts_link;     /* next file structure */
>       struct _ftsent *fts_cycle;    /* cycle structure */
> -    struct stat    *fts_statp;    /* stat(2) information */
> +    struct stat    *fts_statp;    /* [l]stat(2) information */
>   .\" Also:
>   .\"     ino_t fts_ino;                  /* inode (only for directories)*/
>   .\"     dev_t fts_dev;                  /* device (only for directories)*/
> @@ -186,7 +186,7 @@ A regular file.
>   .TP
>   .B FTS_NS
>   A file for which no
> -.BR stat (2)
> +.RB [ l ] stat (2)
>   information was available.
>   The contents of the
>   .I fts_statp
> @@ -197,7 +197,7 @@ field will be set to indicate what caused the error.
>   .TP
>   .B FTS_NSOK
>   A file for which no
> -.BR stat (2)
> +.RB [ l ] stat (2)
>   information was requested.
>   The contents of the
>   .I fts_statp
> @@ -328,7 +328,7 @@ field are undefined.
>   .TP
>   .I fts_statp
>   A pointer to
> -.BR stat (2)
> +.RB [ l ] stat (2)
>   information for the file.
>   .\" .El
>   .PP
> @@ -391,7 +391,13 @@ instead of the symbolic links themselves.
>   If this option is set, the only symbolic links for which
>   .I FTSENT
>   structures
> -are returned to the application are those referencing nonexistent files.
> +are returned to the application are those referencing nonexistent files:
> +the
> +.I fts_statp
> +field is obtained via
> +.BR stat (2)
> +with a fallback to
> +.BR lstat (2).
>   Either
>   .B FTS_LOGICAL
>   or
> @@ -442,7 +448,11 @@ of the target files they point to.
>   If this option is set,
>   .I FTSENT
>   structures for all symbolic links in the
> -hierarchy are returned to the application.
> +hierarchy are returned to the application:
> +the
> +.I fts_statp
> +is obtained via
> +.BR lstat (2).
>   Either
>   .B FTS_LOGICAL
>   or
> @@ -749,7 +759,7 @@ for any of the errors specified for
>   .BR opendir (3),
>   .BR readdir (3),
>   and
> -.BR stat (2).
> +.RB [ l ] stat (2).
>   .PP
>   In addition,
>   .BR fts_children (),
> @@ -811,6 +821,7 @@ a program using the LFS APIs (e.g., when compiling with
>   .SH SEE ALSO
>   .BR find (1),
>   .BR chdir (2),
> +.BR lstat (2),
>   .BR stat (2),
>   .BR ftw (3),
>   .BR qsort (3)

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2022-07-03 23:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 22:23 [PATCH 1/4] fts.3: note that lstat(2) may also provide fts_statp наб
2022-07-03 22:23 ` [PATCH 2/4] fts.3: list primary modes first, remove triplicate requirement spiel наб
2022-07-04 21:57   ` Alejandro Colomar
2022-07-03 22:23 ` [PATCH 3/4] fts.3: wfix наб
2022-07-04 21:59   ` Alejandro Colomar
2022-07-03 22:23 ` [PATCH 4/4] fts.3: tfix наб
2022-07-04 22:02   ` Alejandro Colomar
2022-07-03 23:04 ` Alejandro Colomar [this message]
2022-07-03 23:12   ` [PATCH 1/4] fts.3: note that lstat(2) may also provide fts_statp наб
2022-07-03 23:32     ` Alejandro Colomar
2022-07-04 21:53 ` Alejandro Colomar
2022-07-05 16:21 ` [PATCH v2 1/5] " наб
2022-07-05 17:23   ` Alejandro Colomar
2022-07-05 16:21 ` [PATCH v2 2/5] fts.3: remove triplicate requirement spiel наб
2022-07-05 16:21 ` [PATCH v2 3/5] fts.3: clarify FTS_COMFOLLOW behaviour наб
2022-07-05 16:22 ` [PATCH v2 4/5] fts.3: list primary modes first наб
2022-07-05 16:22 ` [PATCH v2 5/5] fts.3: tfix наб

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e1cb4dc-921b-8a37-df1f-72b18dff5083@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox