[PATCH v2 2/5] manual: Document mkdirat

Arjun Shankar arjun@redhat.com
Mon Jan 6 16:26:07 GMT 2025


---
 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
+
 @node File Attributes
 @section File Attributes
 
@@ -3805,7 +3825,6 @@ The @code{mkdtemp} function comes from OpenBSD.
 @c futimesat
 @c fstatat (there's a commented-out safety assessment for this one)
 @c statx
-@c mkdirat
 @c mkfifoat
 @c name_to_handle_at
 @c openat
-- 
2.47.1



More information about the Libc-alpha mailing list