| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 4 |
.\" |
| 5 |
.TH open_how 2type 2025-09-21 "Linux man-pages 6.18" |
| 6 |
.SH NAME |
| 7 |
open_how \- how to open a pathname |
| 8 |
.SH LIBRARY |
| 9 |
Linux kernel headers |
| 10 |
.SH SYNOPSIS |
| 11 |
.EX |
| 12 |
.B #include <linux/openat2.h> |
| 13 |
.P |
| 14 |
.B struct open_how { |
| 15 |
.BR " u64 flags;" " /* " O_ "* flags */" |
| 16 |
.BR " u64 mode;" " /* Mode for " O_ { CREAT , TMPFILE "} */" |
| 17 |
.BR " u64 resolve;" " /* " RESOLVE_ "* flags */" |
| 18 |
/* ...\& */ |
| 19 |
.B }; |
| 20 |
.EE |
| 21 |
.SH DESCRIPTION |
| 22 |
Specifies how a pathname should be opened. |
| 23 |
.P |
| 24 |
The fields are as follows: |
| 25 |
.TP |
| 26 |
.I flags |
| 27 |
This field specifies the file creation and file status flags |
| 28 |
to use when opening the file. |
| 29 |
.TP |
| 30 |
.I mode |
| 31 |
This field specifies the mode for the new file. |
| 32 |
.TP |
| 33 |
.I resolve |
| 34 |
This is a bit mask of flags that modify the way in which |
| 35 |
.I all |
| 36 |
components of a pathname will be resolved |
| 37 |
(see |
| 38 |
.BR path_resolution (7) |
| 39 |
for background information). |
| 40 |
.SH STANDARDS |
| 41 |
Linux. |
| 42 |
.SH HISTORY |
| 43 |
Extra fields may be appended to the structure, |
| 44 |
with a zero value in a new field resulting in |
| 45 |
the kernel behaving as though that extension field was not present. |
| 46 |
Therefore, a user |
| 47 |
.I must |
| 48 |
zero-fill this structure on initialization. |
| 49 |
.SH SEE ALSO |
| 50 |
.BR openat2 (2) |