Re: [PATCH] fts.3: note fts_open() behaviour with empty strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

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: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux