diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-23 00:55:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-23 00:55:41 +0200 |
commit | 5307e1bf018bdd913012150e291535b31fba38ee (patch) | |
tree | ccf4d0447cee89eca71aea49abc577a49d876e0a /Kernel | |
parent | ecf85875b5dd8de479429e2aec4eb280eb91c1d8 (diff) | |
download | serenity-5307e1bf018bdd913012150e291535b31fba38ee.zip |
Kernel/SysFS: Silently ignore attempts to update SysFS timestamps
We have to override Inode::update_timestamps() for SysFS inodes,
otherwise we'll get the default behavior of erroring with ENOTIMPL.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/SysFS.cpp | 5 | ||||
-rw-r--r-- | Kernel/FileSystem/SysFS.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index 33ae1bff94..8da22c5afd 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -126,6 +126,11 @@ ErrorOr<void> SysFSInode::truncate(u64 size) return m_associated_component->truncate(size); } +ErrorOr<void> SysFSInode::update_timestamps(Optional<time_t>, Optional<time_t>, Optional<time_t>) +{ + return {}; +} + ErrorOr<NonnullLockRefPtr<SysFSLinkInode>> SysFSLinkInode::try_create(SysFS const& sysfs, SysFSComponent const& component) { return adopt_nonnull_lock_ref_or_enomem(new (nothrow) SysFSLinkInode(sysfs, component)); diff --git a/Kernel/FileSystem/SysFS.h b/Kernel/FileSystem/SysFS.h index 303585ecf6..8729b905a2 100644 --- a/Kernel/FileSystem/SysFS.h +++ b/Kernel/FileSystem/SysFS.h @@ -54,6 +54,7 @@ protected: virtual ErrorOr<void> chmod(mode_t) override; virtual ErrorOr<void> chown(UserID, GroupID) override; virtual ErrorOr<void> truncate(u64) override; + virtual ErrorOr<void> update_timestamps(Optional<time_t> atime, Optional<time_t> ctime, Optional<time_t> mtime) override; virtual ErrorOr<void> attach(OpenFileDescription& description) override final; virtual void did_seek(OpenFileDescription&, off_t) override final; |