mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 21:05:07 +00:00
Kernel: Simplify Process::get_syscall_path_argument()
This commit is contained in:
parent
f30eae7e7a
commit
2ab8fd89fc
1 changed files with 1 additions and 4 deletions
|
@ -544,10 +544,7 @@ KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<c
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
if (path_length > PATH_MAX)
|
if (path_length > PATH_MAX)
|
||||||
return ENAMETOOLONG;
|
return ENAMETOOLONG;
|
||||||
auto string_or_error = try_copy_kstring_from_user(user_path, path_length);
|
return try_copy_kstring_from_user(user_path, path_length);
|
||||||
if (string_or_error.is_error())
|
|
||||||
return string_or_error.error();
|
|
||||||
return string_or_error.release_value();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const
|
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue