open_how(2type)

open_how2type

How to open a pathname

Usage

#include <linux/openat2.h>

struct open_how { u64 flags; /* O_* flags */ u64 mode; /* Mode for O_{CREAT,TMPFILE} */ u64 resolve; /* RESOLVE_* flags */
/* ... */ };

Library

Linux kernel headers

Overview

Specifies how a pathname should be opened.

The fields are as follows:

flags

This field specifies the file creation and file status flags to use when opening the file.

mode

This field specifies the mode for the new file.

resolve

This is a bit mask of flags that modify the way in which all components of a pathname will be resolved (see path_resolution(7) for background information).

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

Standards

Linux.

History

Extra fields may be appended to the structure, with a zero value in a new field resulting in the kernel behaving as though that extension field was not present. Therefore, a user must zero-fill this structure on initialization.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.