mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 20:32:12 +00:00
Kernel: stat(), fstat() and lstat() didn't return some error codes.
This commit is contained in:
parent
0c9a2b1430
commit
1fffc0ae60
1 changed files with 3 additions and 6 deletions
|
@ -1209,8 +1209,7 @@ int Process::sys$fstat(int fd, stat* statbuf)
|
|||
auto* descriptor = file_descriptor(fd);
|
||||
if (!descriptor)
|
||||
return -EBADF;
|
||||
descriptor->fstat(statbuf);
|
||||
return 0;
|
||||
return descriptor->fstat(statbuf);
|
||||
}
|
||||
|
||||
int Process::sys$lstat(const char* path, stat* statbuf)
|
||||
|
@ -1221,8 +1220,7 @@ int Process::sys$lstat(const char* path, stat* statbuf)
|
|||
auto descriptor = VFS::the().open(move(path), error, O_NOFOLLOW_NOERROR | O_DONT_OPEN_DEVICE, 0, *cwd_inode());
|
||||
if (!descriptor)
|
||||
return error;
|
||||
descriptor->fstat(statbuf);
|
||||
return 0;
|
||||
return descriptor->fstat(statbuf);
|
||||
}
|
||||
|
||||
int Process::sys$stat(const char* path, stat* statbuf)
|
||||
|
@ -1233,8 +1231,7 @@ int Process::sys$stat(const char* path, stat* statbuf)
|
|||
auto descriptor = VFS::the().open(move(path), error, O_DONT_OPEN_DEVICE, 0, *cwd_inode());
|
||||
if (!descriptor)
|
||||
return error;
|
||||
descriptor->fstat(statbuf);
|
||||
return 0;
|
||||
return descriptor->fstat(statbuf);
|
||||
}
|
||||
|
||||
int Process::sys$readlink(const char* path, char* buffer, size_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue