mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
Kernel: Make File::write() and File::read() return KResultOr<size_t>
Instead of returning a ssize_t where negative values mean error, we now return KResultOr<size_t> and use the error state to report errors exclusively.
This commit is contained in:
parent
58feebeed2
commit
7a3ab6c517
58 changed files with 223 additions and 229 deletions
|
@ -60,8 +60,8 @@ public:
|
|||
KResult close();
|
||||
|
||||
off_t seek(off_t, int whence);
|
||||
ssize_t read(u8*, ssize_t);
|
||||
ssize_t write(const u8* data, ssize_t);
|
||||
KResultOr<size_t> read(u8*, size_t);
|
||||
KResultOr<size_t> write(const u8* data, size_t);
|
||||
KResult fstat(stat&);
|
||||
|
||||
KResult chmod(mode_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue