diff options
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.h | 25 | ||||
-rw-r--r-- | Kernel/UnixTypes.h | 25 | ||||
-rw-r--r-- | Libraries/LibC/unistd.h | 8 |
3 files changed, 29 insertions, 29 deletions
diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h index d4c70c3e38..06f9c470eb 100644 --- a/Kernel/FileSystem/VirtualFileSystem.h +++ b/Kernel/FileSystem/VirtualFileSystem.h @@ -40,31 +40,6 @@ namespace Kernel { -#define O_RDONLY (1 << 0) -#define O_WRONLY (1 << 1) -#define O_RDWR (O_RDONLY | O_WRONLY) -#define O_ACCMODE (O_RDONLY | O_WRONLY) -#define O_EXEC (1 << 2) -#define O_CREAT (1 << 3) -#define O_EXCL (1 << 4) -#define O_NOCTTY (1 << 5) -#define O_TRUNC (1 << 6) -#define O_APPEND (1 << 7) -#define O_NONBLOCK (1 << 8) -#define O_DIRECTORY (1 << 9) -#define O_NOFOLLOW (1 << 10) -#define O_CLOEXEC (1 << 11) -#define O_DIRECT (1 << 12) - -// Kernel internal options -#define O_NOFOLLOW_NOERROR (1 << 29) -#define O_UNLINK_INTERNAL (1 << 30) - -#define MS_NODEV 1 -#define MS_NOEXEC 2 -#define MS_NOSUID 4 -#define MS_BIND 8 - class Custody; class Device; class FileDescription; diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h index 1a6583ef9b..9191c69762 100644 --- a/Kernel/UnixTypes.h +++ b/Kernel/UnixTypes.h @@ -28,6 +28,31 @@ #include <AK/Types.h> +#define O_RDONLY (1 << 0) +#define O_WRONLY (1 << 1) +#define O_RDWR (O_RDONLY | O_WRONLY) +#define O_ACCMODE (O_RDONLY | O_WRONLY) +#define O_EXEC (1 << 2) +#define O_CREAT (1 << 3) +#define O_EXCL (1 << 4) +#define O_NOCTTY (1 << 5) +#define O_TRUNC (1 << 6) +#define O_APPEND (1 << 7) +#define O_NONBLOCK (1 << 8) +#define O_DIRECTORY (1 << 9) +#define O_NOFOLLOW (1 << 10) +#define O_CLOEXEC (1 << 11) +#define O_DIRECT (1 << 12) + +// Kernel internal options. +#define O_NOFOLLOW_NOERROR (1 << 29) +#define O_UNLINK_INTERNAL (1 << 30) + +#define MS_NODEV (1 << 0) +#define MS_NOEXEC (1 << 1) +#define MS_NOSUID (1 << 2) +#define MS_BIND (1 << 3) + #define PERF_EVENT_MALLOC 1 #define PERF_EVENT_FREE 2 diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h index 82174d6a8e..4a4621fe8e 100644 --- a/Libraries/LibC/unistd.h +++ b/Libraries/LibC/unistd.h @@ -149,10 +149,10 @@ enum { #define X_OK 1 #define F_OK 0 -#define MS_NODEV 1 -#define MS_NOEXEC 2 -#define MS_NOSUID 4 -#define MS_BIND 8 +#define MS_NODEV (1 << 0) +#define MS_NOEXEC (1 << 1) +#define MS_NOSUID (1 << 2) +#define MS_BIND (1 << 3) /* * We aren't fully compliant (don't support policies, and don't have a wide |