From 2b52ea4c6f29104dab353bbcb445b6189ef12d91 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sat, 14 Sep 2024 19:39:41 +0300 Subject: [PATCH] Kernel: Make Inode::can_access const --- kernel/include/kernel/FS/Inode.h | 2 +- kernel/kernel/FS/Inode.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/include/kernel/FS/Inode.h b/kernel/include/kernel/FS/Inode.h index fb81c6be..fdc6840c 100644 --- a/kernel/include/kernel/FS/Inode.h +++ b/kernel/include/kernel/FS/Inode.h @@ -64,7 +64,7 @@ namespace Kernel public: 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(); } diff --git a/kernel/kernel/FS/Inode.cpp b/kernel/kernel/FS/Inode.cpp index 4a42960d..90ed074d 100644 --- a/kernel/kernel/FS/Inode.cpp +++ b/kernel/kernel/FS/Inode.cpp @@ -6,7 +6,7 @@ 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()) return true;