mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:27:42 +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);
|
auto* descriptor = file_descriptor(fd);
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return -EBADF;
|
return -EBADF;
|
||||||
descriptor->fstat(statbuf);
|
return descriptor->fstat(statbuf);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Process::sys$lstat(const char* path, stat* 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());
|
auto descriptor = VFS::the().open(move(path), error, O_NOFOLLOW_NOERROR | O_DONT_OPEN_DEVICE, 0, *cwd_inode());
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return error;
|
return error;
|
||||||
descriptor->fstat(statbuf);
|
return descriptor->fstat(statbuf);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Process::sys$stat(const char* path, stat* 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());
|
auto descriptor = VFS::the().open(move(path), error, O_DONT_OPEN_DEVICE, 0, *cwd_inode());
|
||||||
if (!descriptor)
|
if (!descriptor)
|
||||||
return error;
|
return error;
|
||||||
descriptor->fstat(statbuf);
|
return descriptor->fstat(statbuf);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int Process::sys$readlink(const char* path, char* buffer, size_t size)
|
int Process::sys$readlink(const char* path, char* buffer, size_t size)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue