summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-03 06:26:48 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-03 06:27:16 +0100
commit1fffc0ae60547b1e2f42a94a695ea083644f5ac8 (patch)
treef591c79591ac0f7e5323130c707308ce7bccde03 /Kernel
parent0c9a2b14305576621632c7f1399d19dd5c67153f (diff)
downloadserenity-1fffc0ae60547b1e2f42a94a695ea083644f5ac8.zip
Kernel: stat(), fstat() and lstat() didn't return some error codes.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Process.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index c5987d60bc..a1e1a62c37 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -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)