mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 01:48:11 +00:00
Kernel: fix assertion on readlink() syscall
The is_error() check on the KResultOr returned when reading the link target had a stray ! operator which causes link resolution to crash the kernel with an assertion error.
This commit is contained in:
parent
8ff4ebb589
commit
6137475c39
1 changed files with 1 additions and 1 deletions
|
@ -1944,7 +1944,7 @@ int Process::sys$readlink(const Syscall::SC_readlink_params* user_params)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
auto contents = description->read_entire_file();
|
auto contents = description->read_entire_file();
|
||||||
if (!contents.is_error())
|
if (contents.is_error())
|
||||||
return contents.error();
|
return contents.error();
|
||||||
|
|
||||||
auto link_target = String::copy(contents.value());
|
auto link_target = String::copy(contents.value());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue