mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Kernel: Rename Custody::create() => try_create()
The try_ prefix indicates that this may fail. :^)
This commit is contained in:
parent
9a827ad3da
commit
9d801d2345
5 changed files with 18 additions and 19 deletions
|
@ -26,11 +26,11 @@ KResultOr<int> Process::sys$chroot(Userspace<const char*> user_path, size_t path
|
|||
m_root_directory_relative_to_global_root = directory;
|
||||
int chroot_mount_flags = mount_flags == -1 ? directory->mount_flags() : mount_flags;
|
||||
|
||||
auto custody = Custody::create(nullptr, "", directory->inode(), chroot_mount_flags);
|
||||
if (custody.is_error())
|
||||
return custody.error();
|
||||
auto custody_or_error = Custody::try_create(nullptr, "", directory->inode(), chroot_mount_flags);
|
||||
if (custody_or_error.is_error())
|
||||
return custody_or_error.error();
|
||||
|
||||
set_root_directory(custody.release_value());
|
||||
set_root_directory(custody_or_error.release_value());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue