mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
Kernel: Convert Process::get_syscall_path_argument() to KString
This API now returns a KResultOr<NonnullOwnPtr<KString>> and allocation failures should be propagated everywhere nicely. :^)
This commit is contained in:
parent
66f3ec687b
commit
1123af361d
25 changed files with 42 additions and 42 deletions
|
@ -43,7 +43,7 @@ KResultOr<int> Process::sys$open(Userspace<const Syscall::SC_open_params*> user_
|
|||
if (path.is_error())
|
||||
return path.error();
|
||||
|
||||
dbgln_if(IO_DEBUG, "sys$open(dirfd={}, path='{}', options={}, mode={})", dirfd, path.value(), options, mode);
|
||||
dbgln_if(IO_DEBUG, "sys$open(dirfd={}, path='{}', options={}, mode={})", dirfd, path.value()->view(), options, mode);
|
||||
int fd = alloc_fd();
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
@ -62,7 +62,7 @@ KResultOr<int> Process::sys$open(Userspace<const Syscall::SC_open_params*> user_
|
|||
base = base_description->custody();
|
||||
}
|
||||
|
||||
auto result = VFS::the().open(path.value(), options, mode & ~umask(), *base);
|
||||
auto result = VFS::the().open(path.value()->view(), options, mode & ~umask(), *base);
|
||||
if (result.is_error())
|
||||
return result.error();
|
||||
auto description = result.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue