1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

Kernel: Make syscalls that take a buffer size use ssize_t instead of size_t.

Dealing with the unsigned overflow propagation here just seems unreasonably
error prone. Let's limit ourselves to 2GB buffer sizes instead.
This commit is contained in:
Andreas Kling 2019-02-25 21:19:57 +01:00
parent 5af4e622b9
commit beda478821
40 changed files with 144 additions and 136 deletions

View file

@ -30,14 +30,14 @@ public:
int close();
off_t seek(off_t, int whence);
ssize_t read(Process&, byte*, size_t);
ssize_t write(Process&, const byte* data, size_t);
ssize_t read(Process&, byte*, ssize_t);
ssize_t write(Process&, const byte* data, ssize_t);
int fstat(stat*);
bool can_read(Process&);
bool can_write(Process&);
ssize_t get_dir_entries(byte* buffer, size_t);
ssize_t get_dir_entries(byte* buffer, ssize_t);
ByteBuffer read_entire_file(Process&);