[PATCH v2 2/5] manual: Document mkdirat

Florian Weimer fweimer@redhat.com
Wed Jan 8 08:17:57 GMT 2025


* Arjun Shankar:

> ---
>  manual/filesys.texi | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/manual/filesys.texi b/manual/filesys.texi
> index 407c26bd76..e92730209c 100644
> --- a/manual/filesys.texi
> +++ b/manual/filesys.texi
> @@ -1880,6 +1880,26 @@ To use this function, your program should include the header file
>  @pindex sys/stat.h
>  @end deftypefun
>  
> +@deftypefun int mkdirat (int @var{filedes}, const char *@var{filename}, mode_t @var{mode})
> +@standards{POSIX.1-2008, sys/stat.h}
> +@comment Unaudited and therefore marked AC-Unsafe and AS-Unsafe by default
> +@safety{@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
> +This function is a descriptor-relative version of the @code{mkdir}
> +function above.  @xref{Descriptor-Relative Access}.
> +
> +Compared to @code{mkdir}, the following additional error conditions can
> +occur:
> +
> +@table @code
> +@item EBADF
> +The @var{filedes} argument is not a valid file descriptor.
> +
> +@item ENOTDIR
> +The descriptor @var{filedes} is not associated with a directory, and
> +@var{filename} is a relative file name.
> +@end table
> +@end deftypefun

I think these two should mention AT_FDCWD in addition to “valid file
descriptor”.

Thanks,
Florian



More information about the Libc-alpha mailing list