Kernel: Convert ProcFS Process getters to try_serialize_absolute_path

This commit is contained in:
Idan Horowitz 2022-01-11 21:48:48 +02:00
parent 174056a479
commit efc61370c0
Notes: sideshowbarker 2024-07-17 21:03:41 +09:00

View file

@ -265,7 +265,7 @@ ErrorOr<void> Process::procfs_get_virtual_memory_stats(KBufferBuilder& builder)
ErrorOr<void> Process::procfs_get_current_work_directory_link(KBufferBuilder& builder) const
{
return builder.append_bytes(const_cast<Process&>(*this).current_directory().absolute_path().bytes());
return builder.append(TRY(const_cast<Process&>(*this).current_directory().try_serialize_absolute_path())->view());
}
mode_t Process::binary_link_required_mode() const
@ -280,7 +280,7 @@ ErrorOr<void> Process::procfs_get_binary_link(KBufferBuilder& builder) const
auto const* custody = executable();
if (!custody)
return Error::from_errno(ENOEXEC);
return builder.append(custody->absolute_path().bytes());
return builder.append(TRY(custody->try_serialize_absolute_path())->view());
}
ErrorOr<void> Process::procfs_get_tty_link(KBufferBuilder& builder) const