summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man2/openat2.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man2/openat2.2
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/openat2.2')
-rw-r--r--upstream/opensuse-tumbleweed/man2/openat2.234
1 files changed, 17 insertions, 17 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/openat2.2 b/upstream/opensuse-tumbleweed/man2/openat2.2
index b98bbaf8..e758bd4f 100644
--- a/upstream/opensuse-tumbleweed/man2/openat2.2
+++ b/upstream/opensuse-tumbleweed/man2/openat2.2
@@ -1,7 +1,7 @@
.\" Copyright (C) 2019 Aleksa Sarai <cyphar@cyphar.com>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH openat2 2 2023-04-23 "Linux man-pages 6.05.01"
+.TH openat2 2 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
openat2 \- open and possibly create a file (extended)
.SH LIBRARY
@@ -14,11 +14,11 @@ Standard C library
.BR "#include <linux/openat2.h>" " /* Definition of " RESOLVE_* " constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "long syscall(SYS_openat2, int " dirfd ", const char *" pathname ,
.BI " struct open_how *" how ", size_t " size );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrapper for
.BR openat2 (),
@@ -30,7 +30,7 @@ The
system call is an extension of
.BR openat (2)
and provides a superset of its functionality.
-.PP
+.P
The
.BR openat2 ()
system call opens the file specified by
@@ -40,7 +40,7 @@ If the specified file does not exist, it may optionally (if
is specified in
.IR how.flags )
be created.
-.PP
+.P
As with
.BR openat (2),
if
@@ -64,7 +64,7 @@ in which case
.I pathname
is resolved relative to
.IR dirfd ).
-.PP
+.P
Rather than taking a single
.I flags
argument, an extensible structure (\fIhow\fP) is passed to allow for
@@ -90,7 +90,7 @@ This argument is a pointer to an
structure,
described in
.BR open_how (2type).
-.PP
+.P
Any future extensions to
.BR openat2 ()
will be implemented as new fields appended to the
@@ -105,7 +105,7 @@ initialization.
(See the "Extensibility" section of the
.B NOTES
for more detail on why this is necessary.)
-.PP
+.P
The fields of the
.I open_how
structure are as follows:
@@ -374,7 +374,7 @@ in the kernel's lookup cache.
If any kind of revalidation or I/O is needed to satisfy the lookup,
.BR openat2 ()
fails with the error
-.B EAGAIN .
+.BR EAGAIN .
This is useful in providing a fast-path open that can be performed without
resorting to thread offload, or other mechanisms that an application might
use to offload slower operations.
@@ -421,7 +421,7 @@ information.
The caller should retry without
.B RESOLVE_CACHED
set in
-.I how.resolve .
+.IR how.resolve .
.TP
.B EINVAL
An unknown flag or invalid value was specified in
@@ -471,7 +471,7 @@ Linux.
.SH HISTORY
Linux 5.6.
.\" commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
-.PP
+.P
The semantics of
.B RESOLVE_BENEATH
were modeled after FreeBSD's
@@ -495,7 +495,7 @@ This extensibility design is very similar to other system calls such as
.BR perf_event_open (2),
and
.BR clone3 (2).
-.PP
+.P
If we let
.I usize
be the size of the structure as specified by the user-space application, and
@@ -538,7 +538,7 @@ If any unsupported extension fields are nonzero, then \-1 is returned and
is set to
.BR E2BIG .
This provides forwards-compatibility.
-.PP
+.P
Because the definition of
.I struct open_how
may change in the future (with new fields being added when system headers are
@@ -548,18 +548,18 @@ to ensure that recompiling the program with new headers will not result in
spurious errors at run time.
The simplest way is to use a designated
initializer:
-.PP
+.P
.in +4n
.EX
struct open_how how = { .flags = O_RDWR,
.resolve = RESOLVE_IN_ROOT };
.EE
.in
-.PP
+.P
or explicitly using
.BR memset (3)
or similar:
-.PP
+.P
.in +4n
.EX
struct open_how how;
@@ -568,7 +568,7 @@ how.flags = O_RDWR;
how.resolve = RESOLVE_IN_ROOT;
.EE
.in
-.PP
+.P
A user-space application that wishes to determine which extensions
the running kernel supports can do so by conducting a binary search on
.I size