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 <fcntl.h>
|
||||||
.B #include <openat2.h>
|
.B #include <openat2.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int openat2(int " dirfd ", const char *" pathname ", \
|
.BI "int openat2(int " dirfd ", const char *" pathname ,
|
||||||
struct open_how *" how ", size_t " size ");
|
.BI " struct open_how *" how ", size_t " size ");
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.IR Note :
|
.IR Note :
|
||||||
|
@ -385,14 +385,13 @@ be the size of the structure according to userspace and
|
||||||
.I ksize
|
.I ksize
|
||||||
be the size of the structure which the kernel supports, then there are only
|
be the size of the structure which the kernel supports, then there are only
|
||||||
three cases to consider:
|
three cases to consider:
|
||||||
.RS
|
.IP \(bu 2
|
||||||
.IP * 3
|
|
||||||
If
|
If
|
||||||
.IR ksize " equals " usize ,
|
.IR ksize " equals " usize ,
|
||||||
then there is no version mismatch and
|
then there is no version mismatch and
|
||||||
.I how
|
.I how
|
||||||
can be used verbatim.
|
can be used verbatim.
|
||||||
.IP *
|
.IP \(bu
|
||||||
If
|
If
|
||||||
.IR ksize " is larger than " usize ,
|
.IR ksize " is larger than " usize ,
|
||||||
then there are some extensions the kernel supports which the userspace program
|
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
|
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.
|
treats all of the extension fields not set by userspace to have zero values.
|
||||||
This provides backwards-compatibility.
|
This provides backwards-compatibility.
|
||||||
.IP *
|
.IP \(bu
|
||||||
If
|
If
|
||||||
.IR ksize " is smaller than " usize ,
|
.IR ksize " is smaller than " usize ,
|
||||||
then there are some extensions which the userspace program is aware of but the
|
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
|
is set to
|
||||||
.BR E2BIG .
|
.BR E2BIG .
|
||||||
This provides forwards-compatibility.
|
This provides forwards-compatibility.
|
||||||
.RE
|
|
||||||
.PP
|
.PP
|
||||||
Therefore most userspace programs will not need to have any special handling
|
Therefore most userspace programs will not need to have any special handling
|
||||||
of extensions.
|
of extensions.
|
||||||
|
@ -429,7 +427,8 @@ initializer:
|
||||||
.PP
|
.PP
|
||||||
.in +4n
|
.in +4n
|
||||||
.EX
|
.EX
|
||||||
struct open_how how = { .flags = O_RDWR, .resolve = RESOLVE_IN_ROOT };
|
struct open_how how = { .flags = O_RDWR,
|
||||||
|
.resolve = RESOLVE_IN_ROOT };
|
||||||
.EE
|
.EE
|
||||||
.in
|
.in
|
||||||
.PP
|
.PP
|
||||||
|
|
Loading…
Reference in New Issue