mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel+LibC: Clean up open() flag (O_*) definitions
These were using a mix of decimal, octal and hexadecimal for no reason.
This commit is contained in:
parent
6081c76515
commit
07075cd001
Notes:
sideshowbarker
2024-07-19 09:55:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/07075cd0014
2 changed files with 35 additions and 31 deletions
|
@ -38,22 +38,26 @@
|
|||
#include <Kernel/FileSystem/InodeMetadata.h>
|
||||
#include <Kernel/KResult.h>
|
||||
|
||||
#define O_RDONLY 1
|
||||
#define O_WRONLY 2
|
||||
#define O_RDWR 3
|
||||
#define O_EXEC 4
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DIRECTORY 00200000
|
||||
#define O_NOFOLLOW 00400000
|
||||
#define O_CLOEXEC 02000000
|
||||
#define O_DIRECT 04000000
|
||||
#define O_NOFOLLOW_NOERROR 0x4000000
|
||||
#define O_UNLINK_INTERNAL 0x8000000
|
||||
|
||||
#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
|
||||
|
|
|
@ -39,21 +39,21 @@ __BEGIN_DECLS
|
|||
|
||||
#define FD_CLOEXEC 1
|
||||
|
||||
#define O_RDONLY 1
|
||||
#define O_WRONLY 2
|
||||
#define O_RDWR 3
|
||||
#define O_ACCMODE 3
|
||||
#define O_EXEC 4
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
#define O_NOCTTY 0400
|
||||
#define O_TRUNC 01000
|
||||
#define O_APPEND 02000
|
||||
#define O_NONBLOCK 04000
|
||||
#define O_DIRECTORY 00200000
|
||||
#define O_NOFOLLOW 00400000
|
||||
#define O_CLOEXEC 02000000
|
||||
#define O_DIRECT 04000000
|
||||
#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)
|
||||
|
||||
#define S_IFMT 0170000
|
||||
#define S_IFDIR 0040000
|
||||
|
|
Loading…
Reference in a new issue