mirror of https://github.com/mkerrisk/man-pages
openat2.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
03625dc12d
commit
3fcaeb806a
|
@ -31,8 +31,8 @@ openat2 \- open and possibly create a file (extended)
|
|||
.B #include <fcntl.h>
|
||||
.B #include <openat2.h>
|
||||
.PP
|
||||
.BI "int openat2(int " dirfd ", const char *" pathname ", \
|
||||
struct open_how *" how ", size_t " size ");
|
||||
.BI "int openat2(int " dirfd ", const char *" pathname ,
|
||||
.BI " struct open_how *" how ", size_t " size ");
|
||||
.fi
|
||||
.PP
|
||||
.IR Note :
|
||||
|
@ -385,14 +385,13 @@ be the size of the structure according to userspace and
|
|||
.I ksize
|
||||
be the size of the structure which the kernel supports, then there are only
|
||||
three cases to consider:
|
||||
.RS
|
||||
.IP * 3
|
||||
.IP \(bu 2
|
||||
If
|
||||
.IR ksize " equals " usize ,
|
||||
then there is no version mismatch and
|
||||
.I how
|
||||
can be used verbatim.
|
||||
.IP *
|
||||
.IP \(bu
|
||||
If
|
||||
.IR ksize " is larger than " usize ,
|
||||
then there are some extensions the kernel supports which the userspace program
|
||||
|
@ -400,7 +399,7 @@ is unaware of.
|
|||
Because all extensions must have their zero values be a no-op, the kernel
|
||||
treats all of the extension fields not set by userspace to have zero values.
|
||||
This provides backwards-compatibility.
|
||||
.IP *
|
||||
.IP \(bu
|
||||
If
|
||||
.IR ksize " is smaller than " usize ,
|
||||
then there are some extensions which the userspace program is aware of but the
|
||||
|
@ -412,7 +411,6 @@ If any unsupported extension fields are non-zero, then \-1 is returned and
|
|||
is set to
|
||||
.BR E2BIG .
|
||||
This provides forwards-compatibility.
|
||||
.RE
|
||||
.PP
|
||||
Therefore most userspace programs will not need to have any special handling
|
||||
of extensions.
|
||||
|
@ -429,7 +427,8 @@ initializer:
|
|||
.PP
|
||||
.in +4n
|
||||
.EX
|
||||
struct open_how how = { .flags = O_RDWR, .resolve = RESOLVE_IN_ROOT };
|
||||
struct open_how how = { .flags = O_RDWR,
|
||||
.resolve = RESOLVE_IN_ROOT };
|
||||
.EE
|
||||
.in
|
||||
.PP
|
||||
|
|
Loading…
Reference in New Issue