diff options
author | Liav A <liavalb@gmail.com> | 2022-10-14 14:52:01 +0300 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2022-10-25 15:33:34 -0600 |
commit | dc5b28e26cbbce01af2ce9cc919c0a31f46d565e (patch) | |
tree | 53c4cffdefb8274473978a0b3177d05ff161ca95 /Kernel/ProcessExposed.h | |
parent | 1c5e09f789a3c9e03c8bd3e0ebee08a07ec424bf (diff) | |
download | serenity-dc5b28e26cbbce01af2ce9cc919c0a31f46d565e.zip |
Kernel/ProcFS: Remove all unnecessary components
Now that all global nodes are located in the /sys/kernel directory, we
can safely drop the global nodes in /proc, which includes both /proc/net
and /proc/sys directories as well.
This in fact leaves the ProcFS to only have subdirectories for processes
and the "self" symbolic link to reflect the current process being run.
Diffstat (limited to 'Kernel/ProcessExposed.h')
-rw-r--r-- | Kernel/ProcessExposed.h | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/Kernel/ProcessExposed.h b/Kernel/ProcessExposed.h index 5658088d33..45af1085b5 100644 --- a/Kernel/ProcessExposed.h +++ b/Kernel/ProcessExposed.h @@ -86,7 +86,7 @@ public: return {}; } - virtual ErrorOr<NonnullLockRefPtr<Inode>> to_inode(ProcFS const& procfs_instance) const; + virtual ErrorOr<NonnullLockRefPtr<Inode>> to_inode(ProcFS const& procfs_instance) const = 0; virtual InodeIndex component_index() const { return m_component_index; } @@ -162,44 +162,4 @@ struct ProcFSInodeData : public OpenFileDescriptionData { OwnPtr<KBuffer> buffer; }; -class ProcFSGlobalInformation : public ProcFSExposedComponent { -public: - virtual ~ProcFSGlobalInformation() override {}; - - virtual ErrorOr<size_t> read_bytes(off_t offset, size_t count, UserOrKernelBuffer& buffer, OpenFileDescription* description) const override; - - virtual mode_t required_mode() const override { return 0444; } - -protected: - explicit ProcFSGlobalInformation(StringView name) - : ProcFSExposedComponent(name) - { - } - virtual ErrorOr<void> refresh_data(OpenFileDescription&) const override; - virtual ErrorOr<void> try_generate(KBufferBuilder&) = 0; - - mutable Mutex m_refresh_lock; -}; - -class ProcFSSystemBoolean : public ProcFSGlobalInformation { -public: - virtual bool value() const = 0; - virtual void set_value(bool new_value) = 0; - -protected: - explicit ProcFSSystemBoolean(StringView name) - : ProcFSGlobalInformation(name) - { - } - -private: - // ^ProcFSGlobalInformation - virtual ErrorOr<void> try_generate(KBufferBuilder&) override final; - - // ^ProcFSExposedComponent - virtual ErrorOr<size_t> write_bytes(off_t, size_t, UserOrKernelBuffer const&, OpenFileDescription*) override final; - virtual mode_t required_mode() const override final { return 0644; } - virtual ErrorOr<void> truncate(u64) override final; -}; - } |