Kernel: Move InodeMetadata methods out of line
This commit is contained in:
parent
11eee67b85
commit
bec314611d
Notes:
sideshowbarker
2024-07-17 08:07:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bec314611d
3 changed files with 28 additions and 15 deletions
|
@ -126,6 +126,7 @@ set(KERNEL_SOURCES
|
|||
FileSystem/FileSystem.cpp
|
||||
FileSystem/Inode.cpp
|
||||
FileSystem/InodeFile.cpp
|
||||
FileSystem/InodeMetadata.cpp
|
||||
FileSystem/InodeWatcher.cpp
|
||||
FileSystem/ISO9660FileSystem.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
|
||||
{
|
||||
return m_process->pid();
|
||||
|
|
Loading…
Add table
Reference in a new issue