mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 23:15:10 +00:00

This flag doesn't conform to any POSIX standard nor is found in any OS out there. The idea behind this mount flag is to ensure that only non-regular files will be placed in a filesystem, which includes device nodes, symbolic links, directories, FIFOs and sockets. Currently, the only valid case for using this mount flag is for TmpFS instances, where we want to mount a TmpFS but disallow any kind of regular file and only allow other types of files on the filesystem.
66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Kernel/API/POSIX/sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define STDIN_FILENO 0
|
|
#define STDOUT_FILENO 1
|
|
#define STDERR_FILENO 2
|
|
|
|
#define R_OK 4
|
|
#define W_OK 2
|
|
#define X_OK 1
|
|
#define F_OK 0
|
|
|
|
#define MS_NODEV (1 << 0)
|
|
#define MS_NOEXEC (1 << 1)
|
|
#define MS_NOSUID (1 << 2)
|
|
#define MS_BIND (1 << 3)
|
|
#define MS_RDONLY (1 << 4)
|
|
#define MS_REMOUNT (1 << 5)
|
|
#define MS_WXALLOWED (1 << 6)
|
|
#define MS_AXALLOWED (1 << 7)
|
|
#define MS_NOREGULAR (1 << 8)
|
|
|
|
enum {
|
|
_SC_MONOTONIC_CLOCK,
|
|
_SC_NPROCESSORS_CONF,
|
|
_SC_NPROCESSORS_ONLN,
|
|
_SC_OPEN_MAX,
|
|
_SC_HOST_NAME_MAX,
|
|
_SC_TTY_NAME_MAX,
|
|
_SC_PAGESIZE,
|
|
_SC_GETPW_R_SIZE_MAX,
|
|
_SC_CLK_TCK,
|
|
_SC_SYMLOOP_MAX,
|
|
_SC_MAPPED_FILES,
|
|
_SC_ARG_MAX,
|
|
_SC_IOV_MAX,
|
|
};
|
|
|
|
#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
|
|
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
|
|
#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
|
|
#define _SC_OPEN_MAX _SC_OPEN_MAX
|
|
#define _SC_PAGESIZE _SC_PAGESIZE
|
|
#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
|
|
#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
|
|
#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
|
|
#define _SC_CLK_TCK _SC_CLK_TCK
|
|
#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
|
|
#define _SC_MAPPED_FILES _SC_MAPPED_FILES
|
|
#define _SC_ARG_MAX _SC_ARG_MAX
|
|
#define _SC_IOV_MAX _SC_IOV_MAX
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|