Many pages: Document fixed-width types with ISO C naming
[man-pages.git] / man2type / open_how.2type
blob311feafc30501f154422fe452f496791fdc5764d
1 .\" Copyright (c) 2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\"
6 .TH OPEN_HOW 2type 2022-06-16 "Linux man-pages (unreleased)"
7 .SH NAME
8 open_how \- how to open a pathname
9 .SH LIBRARY
10 Linux kernel headers
11 .SH SYNOPSIS
12 .nf
13 .B #include <linux/openat2.h>
14 .PP
15 .B struct open_how {
16 .BR "    uint64_t  flags;" "    /* " O_ "* flags */"
17 .BR "    uint64_t  mode;" "     /* Mode for " O_ { CREAT , TMPFILE "} */"
18 .BR "    uint64_t  resolve;" "  /* " RESOLVE_ "* flags */"
19     /* ... */
20 .B };
21 .fi
22 .SH DESCRIPTION
23 Specifies how a pathname should be open.
24 .PP
25 The fields are as follows:
26 .TP
27 .I flags
28 This field specifies the file creation and file status flags
29 to use when opening the file.
30 .TP
31 .I mode
32 This field specifies the mode for the new file.
33 .TP
34 .I resolve
35 This is a bit mask of flags that modify the way in which
36 .I all
37 components of a pathname will be resolved
38 (see
39 .BR path_resolution (7)
40 for background information).
41 .SH VERSIONS
42 Extra fields may be appended to the structure,
43 with a zero value in a new field resulting in
44 the kernel behaving as though that extension field was not present.
45 Therefore, a user
46 .I must
47 zero-fill this structure on initialization.
48 .SH STANDARDS
49 This type is Linux-specific.
50 .SH SEE ALSO
51 .BR openat2 (2)