linux/include/uapi/linux/mount.h

#ifndef _UAPI_LINUX_MOUNT_H
#define _UAPI_LINUX_MOUNT_H

#include <linux/types.h>

/*
 * These are the fs-independent mount-flags: up to 32 flags are supported
 *
 * Usage of these is restricted within the kernel to core mount(2) code and
 * callers of sys_mount() only.  Filesystems should be using the SB_*
 * equivalent instead.
 */
#define MS_RDONLY
#define MS_NOSUID
#define MS_NODEV
#define MS_NOEXEC
#define MS_SYNCHRONOUS
#define MS_REMOUNT
#define MS_MANDLOCK
#define MS_DIRSYNC
#define MS_NOSYMFOLLOW
#define MS_NOATIME
#define MS_NODIRATIME
#define MS_BIND
#define MS_MOVE
#define MS_REC
#define MS_VERBOSE
#define MS_SILENT
#define MS_POSIXACL
#define MS_UNBINDABLE
#define MS_PRIVATE
#define MS_SLAVE
#define MS_SHARED
#define MS_RELATIME
#define MS_KERNMOUNT
#define MS_I_VERSION
#define MS_STRICTATIME
#define MS_LAZYTIME

/* These sb flags are internal to the kernel */
#define MS_SUBMOUNT
#define MS_NOREMOTELOCK
#define MS_NOSEC
#define MS_BORN
#define MS_ACTIVE
#define MS_NOUSER

/*
 * Superblock flags that can be altered by MS_REMOUNT
 */
#define MS_RMT_MASK

/*
 * Old magic mount flag and mask
 */
#define MS_MGC_VAL
#define MS_MGC_MSK

/*
 * open_tree() flags.
 */
#define OPEN_TREE_CLONE
#define OPEN_TREE_CLOEXEC

/*
 * move_mount() flags.
 */
#define MOVE_MOUNT_F_SYMLINKS
#define MOVE_MOUNT_F_AUTOMOUNTS
#define MOVE_MOUNT_F_EMPTY_PATH
#define MOVE_MOUNT_T_SYMLINKS
#define MOVE_MOUNT_T_AUTOMOUNTS
#define MOVE_MOUNT_T_EMPTY_PATH
#define MOVE_MOUNT_SET_GROUP
#define MOVE_MOUNT_BENEATH
#define MOVE_MOUNT__MASK

/*
 * fsopen() flags.
 */
#define FSOPEN_CLOEXEC

/*
 * fspick() flags.
 */
#define FSPICK_CLOEXEC
#define FSPICK_SYMLINK_NOFOLLOW
#define FSPICK_NO_AUTOMOUNT
#define FSPICK_EMPTY_PATH

/*
 * The type of fsconfig() call made.
 */
enum fsconfig_command {};

/*
 * fsmount() flags.
 */
#define FSMOUNT_CLOEXEC

/*
 * Mount attributes.
 */
#define MOUNT_ATTR_RDONLY
#define MOUNT_ATTR_NOSUID
#define MOUNT_ATTR_NODEV
#define MOUNT_ATTR_NOEXEC
#define MOUNT_ATTR__ATIME
#define MOUNT_ATTR_RELATIME
#define MOUNT_ATTR_NOATIME
#define MOUNT_ATTR_STRICTATIME
#define MOUNT_ATTR_NODIRATIME
#define MOUNT_ATTR_IDMAP
#define MOUNT_ATTR_NOSYMFOLLOW

/*
 * mount_setattr()
 */
struct mount_attr {};

/* List of all mount_attr versions. */
#define MOUNT_ATTR_SIZE_VER0


/*
 * Structure for getting mount/superblock/filesystem info with statmount(2).
 *
 * The interface is similar to statx(2): individual fields or groups can be
 * selected with the @mask argument of statmount().  Kernel will set the @mask
 * field according to the supported fields.
 *
 * If string fields are selected, then the caller needs to pass a buffer that
 * has space after the fixed part of the structure.  Nul terminated strings are
 * copied there and offsets relative to @str are stored in the relevant fields.
 * If the buffer is too small, then EOVERFLOW is returned.  The actually used
 * size is returned in @size.
 */
struct statmount {};

/*
 * Structure for passing mount ID and miscellaneous parameters to statmount(2)
 * and listmount(2).
 *
 * For statmount(2) @param represents the request mask.
 * For listmount(2) @param represents the last listed mount id (or zero).
 */
struct mnt_id_req {};

/* List of all mnt_id_req versions. */
#define MNT_ID_REQ_SIZE_VER0
#define MNT_ID_REQ_SIZE_VER1

/*
 * @mask bits for statmount(2)
 */
#define STATMOUNT_SB_BASIC
#define STATMOUNT_MNT_BASIC
#define STATMOUNT_PROPAGATE_FROM
#define STATMOUNT_MNT_ROOT
#define STATMOUNT_MNT_POINT
#define STATMOUNT_FS_TYPE
#define STATMOUNT_MNT_NS_ID
#define STATMOUNT_MNT_OPTS

/*
 * Special @mnt_id values that can be passed to listmount
 */
#define LSMT_ROOT
#define LISTMOUNT_REVERSE

#endif /* _UAPI_LINUX_MOUNT_H */