mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Kernel: Make O_RDONLY non-zero
Sergey suggested that having a non-zero O_RDONLY would make some things less confusing, and it seems like he's right about that. We can now easily check read/write permissions separately instead of dancing around with the bits. This patch also fixes unveil() validation for O_RDWR which previously forgot to check for "r" permission.
This commit is contained in:
parent
efbd1620d9
commit
6081c76515
6 changed files with 24 additions and 33 deletions
|
@ -38,9 +38,9 @@
|
|||
#include <Kernel/FileSystem/InodeMetadata.h>
|
||||
#include <Kernel/KResult.h>
|
||||
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
#define O_RDONLY 1
|
||||
#define O_WRONLY 2
|
||||
#define O_RDWR 3
|
||||
#define O_EXEC 4
|
||||
#define O_CREAT 0100
|
||||
#define O_EXCL 0200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue