From: Alejandro Colomar <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] fts.3: note fts_open() behaviour with empty strings
Date: Tue, 11 Apr 2023 16:22:09 +0200 [thread overview]
Message-ID: <5aac8abb-9c56-e483-2cfa-9cb2615cd738@gmail.com> (raw)
In-Reply-To: <5pllbtzrjd5qpzjirtmritpk3it4whf43fnigbv3vqfkgwov2u@xk5dulph2uzk>
[-- Attachment #1.1: Type: text/plain, Size: 1500 bytes --]
Hi!
On 4/11/23 04:21, наб wrote:
> This is undocumented in BSD, too, and present in the original SCCS
> check-in (5.1 (Berkeley) 12/30/89).
>
> This is very surprising, since in most other cases FTS is rather quite
> sane about error reporting, but /any/ empty string in the input vector
> blows out the creation entirely.
>
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Applied, with some editorialization:
@@ -722,6 +722,17 @@ .SH ERRORS
and
.BR malloc (3).
.PP
+In addition,
+.BR fts_open ()
+may fail and set
+.I errno
+as follows:
+.TP
+.B ENOENT
+Any element of
+.I path_argv
+was an empty string.
+.PP
The function
.BR fts_close ()
may fail and set
Btw, while you're at it, could you confirm if the nullability (_Nullable)
of the documented funtion prototypes is correct? I never used those
functions.
Cheers,
Alex
> ---
> man3/fts.3 | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/man3/fts.3 b/man3/fts.3
> index 66b2fcab3..392f8acfe 100644
> --- a/man3/fts.3
> +++ b/man3/fts.3
> @@ -722,6 +722,14 @@ for any of the errors specified for
> and
> .BR malloc (3).
> .PP
> +It will also fail and set
> +.I errno
> +to
> +.B ENOENT
> +if any element of
> +.I path_argv
> +is an empty string.
> +.PP
> The function
> .BR fts_close ()
> may fail and set
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-04-11 14:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 2:21 [PATCH] fts.3: note fts_open() behaviour with empty strings наб
2023-04-11 14:22 ` Alejandro Colomar [this message]
2023-04-11 14:36 ` наб
2023-04-11 14:56 ` Alejandro Colomar
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=5aac8abb-9c56-e483-2cfa-9cb2615cd738@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.