mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:37:34 +00:00
Kernel: Move InodeMetadata methods out of line
This commit is contained in:
parent
11eee67b85
commit
bec314611d
3 changed files with 28 additions and 15 deletions
|
@ -126,6 +126,7 @@ set(KERNEL_SOURCES
|
||||||
FileSystem/FileSystem.cpp
|
FileSystem/FileSystem.cpp
|
||||||
FileSystem/Inode.cpp
|
FileSystem/Inode.cpp
|
||||||
FileSystem/InodeFile.cpp
|
FileSystem/InodeFile.cpp
|
||||||
|
FileSystem/InodeMetadata.cpp
|
||||||
FileSystem/InodeWatcher.cpp
|
FileSystem/InodeWatcher.cpp
|
||||||
FileSystem/ISO9660FileSystem.cpp
|
FileSystem/ISO9660FileSystem.cpp
|
||||||
FileSystem/Mount.cpp
|
FileSystem/Mount.cpp
|
||||||
|
|
27
Kernel/FileSystem/InodeMetadata.cpp
Normal file
27
Kernel/FileSystem/InodeMetadata.cpp
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Kernel/FileSystem/InodeMetadata.h>
|
||||||
|
#include <Kernel/Process.h>
|
||||||
|
|
||||||
|
namespace Kernel {
|
||||||
|
|
||||||
|
bool InodeMetadata::may_read(Process const& process) const
|
||||||
|
{
|
||||||
|
return may_read(process.euid(), process.egid(), process.extra_gids());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool InodeMetadata::may_write(Process const& process) const
|
||||||
|
{
|
||||||
|
return may_write(process.euid(), process.egid(), process.extra_gids());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool InodeMetadata::may_execute(Process const& process) const
|
||||||
|
{
|
||||||
|
return may_execute(process.euid(), process.egid(), process.extra_gids());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1014,21 +1014,6 @@ inline void Process::for_each_in_pgrp(ProcessGroupID pgid, Callback callback)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool InodeMetadata::may_read(Process const& process) const
|
|
||||||
{
|
|
||||||
return may_read(process.euid(), process.egid(), process.extra_gids());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool InodeMetadata::may_write(Process const& process) const
|
|
||||||
{
|
|
||||||
return may_write(process.euid(), process.egid(), process.extra_gids());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool InodeMetadata::may_execute(Process const& process) const
|
|
||||||
{
|
|
||||||
return may_execute(process.euid(), process.egid(), process.extra_gids());
|
|
||||||
}
|
|
||||||
|
|
||||||
inline ProcessID Thread::pid() const
|
inline ProcessID Thread::pid() const
|
||||||
{
|
{
|
||||||
return m_process->pid();
|
return m_process->pid();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue