1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

Kernel: Rename Process::cwd_custody() to Process::current_directory().

...and executable_custody() to just executable().
This commit is contained in:
Andreas Kling 2019-05-30 20:23:50 +02:00
parent 393851418b
commit 55821c91f8
4 changed files with 38 additions and 47 deletions

View file

@ -360,7 +360,7 @@ ByteBuffer procfs$pid_exe(InodeIdentifier identifier)
if (!handle)
return { };
auto& process = handle->process();
auto* custody = process.executable_custody();
auto* custody = process.executable();
ASSERT(custody);
return custody->absolute_path().to_byte_buffer();
}
@ -370,7 +370,7 @@ ByteBuffer procfs$pid_cwd(InodeIdentifier identifier)
auto handle = ProcessInspectionHandle::from_pid(to_pid(identifier));
if (!handle)
return { };
return handle->process().cwd_custody().absolute_path().to_byte_buffer();
return handle->process().current_directory().absolute_path().to_byte_buffer();
}
ByteBuffer procfs$self(InodeIdentifier)
@ -953,7 +953,7 @@ bool ProcFSInode::traverse_as_directory(Function<bool(const FS::DirectoryEntry&)
auto& process = handle->process();
for (auto& entry : fs().m_entries) {
if (entry.proc_file_type > __FI_PID_Start && entry.proc_file_type < __FI_PID_End) {
if (entry.proc_file_type == FI_PID_exe && !process.executable_custody())
if (entry.proc_file_type == FI_PID_exe && !process.executable())
continue;
// FIXME: strlen() here is sad.
callback({ entry.name, (int)strlen(entry.name), to_identifier(fsid(), PDI_PID, pid, (ProcFileType)entry.proc_file_type), 0 });
@ -1034,7 +1034,7 @@ InodeIdentifier ProcFSInode::lookup(const String& name)
auto& process = handle->process();
for (auto& entry : fs().m_entries) {
if (entry.proc_file_type > __FI_PID_Start && entry.proc_file_type < __FI_PID_End) {
if (entry.proc_file_type == FI_PID_exe && !process.executable_custody())
if (entry.proc_file_type == FI_PID_exe && !process.executable())
continue;
if (entry.name == nullptr)
continue;