Kernel: Make Inode::can_access const

This commit is contained in:
Bananymous 2024-09-14 19:39:41 +03:00
parent b41738b47b
commit 2b52ea4c6f
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ namespace Kernel
public: public:
virtual ~Inode() {} virtual ~Inode() {}
bool can_access(const Credentials&, int); bool can_access(const Credentials&, int) const;
bool operator==(const Inode& other) const { return dev() == other.dev() && ino() == other.ino(); } bool operator==(const Inode& other) const { return dev() == other.dev() && ino() == other.ino(); }

View File

@ -6,7 +6,7 @@
namespace Kernel namespace Kernel
{ {
bool Inode::can_access(const Credentials& credentials, int flags) bool Inode::can_access(const Credentials& credentials, int flags) const
{ {
if (credentials.is_superuser()) if (credentials.is_superuser())
return true; return true;