Kernel/SysFS: Expose file size of ACPI tables in /sys/firmware/acpi
It costs us nothing, and some utilities (such as the known file utility) rely on the exposed file size (after doing lstat on it), to show anything useful besides saying the file is "empty".
This commit is contained in:
parent
11a5f2c508
commit
462802ef0c
Notes:
sideshowbarker
2024-07-17 05:42:02 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/462802ef0c Pull-request: https://github.com/SerenityOS/serenity/pull/15619 Reviewed-by: https://github.com/ADKaster
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ public:
|
|||
virtual StringView name() const override { return m_table_name->view(); }
|
||||
virtual ErrorOr<size_t> read_bytes(off_t, size_t, UserOrKernelBuffer&, OpenFileDescription*) const override;
|
||||
|
||||
virtual size_t size() const override final { return m_length; }
|
||||
|
||||
protected:
|
||||
ErrorOr<NonnullOwnPtr<KBuffer>> try_to_generate_buffer() const;
|
||||
ACPISysFSComponent(NonnullOwnPtr<KString> table_name, PhysicalAddress, size_t table_size);
|
||||
|
|
Loading…
Add table
Reference in a new issue