diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-02 14:45:55 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-02 14:45:55 +0200 |
commit | bcd1b2bb2d80e0e5c4f87507ae9fb5759e06d7c7 (patch) | |
tree | ad77a5004238a6a76af901d86bbacc156246284d | |
parent | 45b6b8cf87d78675e6685923bbdac0d1d954d525 (diff) |
syscall: Make write() bytes parameter const
-rw-r--r-- | src/lib/syscall.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/syscall.zig b/src/lib/syscall.zig index 8dda736..d7bcd51 100644 --- a/src/lib/syscall.zig +++ b/src/lib/syscall.zig @@ -158,7 +158,7 @@ fn provideDirHook(trap_frame: *trap.Frame) void { })); } -// remove(path: [*:0]const u8) Result(usize) // fixme: Kernel panic if null pointer +// remove(path: [*:0]const u8) Result(void) // fixme: Kernel panic if null pointer fn remove(trap_frame: *const trap.Frame) void { const path: [*:0]const u8 = @ptrFromInt(trap_frame.general_purpose_registers[10]); @@ -179,10 +179,10 @@ fn read(proc: *const process.Info, trap_frame: *trap.Frame) void { sysexchange.frameReturnResult(usize, trap_frame, rd.read(buffer[0..len])); } -// write(handle: usize, bytes: [*]u8, len: usize) Result(usize) +// write(handle: usize, bytes: [*]const u8, len: usize) Result(usize) fn write(proc: *const process.Info, trap_frame: *trap.Frame) void { const handle = trap_frame.general_purpose_registers[10]; - const bytes: [*]u8 = @ptrFromInt(trap_frame.general_purpose_registers[11]); + const bytes: [*]const u8 = @ptrFromInt(trap_frame.general_purpose_registers[11]); const len = trap_frame.general_purpose_registers[12]; const rd = proc.rds.get(handle) orelse { |