| author | |
| committer | |
| log | 813a0f125e2619f0a056d675339cab6ce34a2cbf |
| tree | a2273fd0700d3b949c86768dcb47f110700a690c |
| parent | f5e938433555fb8cb0719d63e842ea26d012bb1d |
Unlike all other platforms where RDONLY is 0 it does not work as a
default for the O flags on serenity - various syscalls other than
'open', e.g. 'pipe', return EINVAL if unexpected bits are set in the
flags.2 files changed, 2 insertions(+), 1 deletions(-)
lib/std/c.zig+1-1| ... | ... | @@ -8604,7 +8604,7 @@ pub const O = switch (native_os) { |
| 8604 | 8604 | }, |
| 8605 | 8605 | // https://github.com/SerenityOS/serenity/blob/2808b0376406a40e31293bb3bcb9170374e90506/Kernel/API/POSIX/fcntl.h#L28-L43 |
| 8606 | 8606 | .serenity => packed struct(c_int) { |
| 8607 | ACCMODE: std.posix.ACCMODE = .RDONLY, | |
| 8607 | ACCMODE: std.posix.ACCMODE = .NONE, | |
| 8608 | 8608 | EXEC: bool = false, |
| 8609 | 8609 | CREAT: bool = false, |
| 8610 | 8610 | EXCL: bool = false, |
lib/std/posix.zig+1| ... | ... | @@ -204,6 +204,7 @@ pub const ACCMODE = switch (native_os) { |
| 204 | 204 | // implements this suggestion. |
| 205 | 205 | // https://github.com/SerenityOS/serenity/blob/4adc51fdf6af7d50679c48b39362e062f5a3b2cb/Kernel/API/POSIX/fcntl.h#L28-L30 |
| 206 | 206 | .serenity => enum(u2) { |
| 207 | NONE = 0, | |
| 207 | 208 | RDONLY = 1, |
| 208 | 209 | WRONLY = 2, |
| 209 | 210 | RDWR = 3, |