mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:17:42 +00:00
Kernel: Allow SysFS components to have non-zero size
This is important for dmidecode because it does an fstat on the DMI blobs, trying to figure out their size. Because we already know the size of the blobs when creating the SysFS components, there's no performance penalty whatsoever, and this allows dmidecode to not use the /dev/mem device as a fallback.
This commit is contained in:
parent
66ff60db07
commit
ae2ec45e78
3 changed files with 7 additions and 1 deletions
|
@ -31,6 +31,7 @@ public:
|
|||
virtual RefPtr<SysFSComponent> lookup(StringView) { VERIFY_NOT_REACHED(); };
|
||||
virtual mode_t permissions() const;
|
||||
virtual ErrorOr<void> truncate(u64) { return EPERM; }
|
||||
virtual size_t size() const { return 0; }
|
||||
virtual ErrorOr<void> set_mtime(time_t) { return ENOTIMPL; }
|
||||
virtual ErrorOr<size_t> write_bytes(off_t, size_t, UserOrKernelBuffer const&, OpenFileDescription*) { return EROFS; }
|
||||
virtual ErrorOr<void> refresh_data(OpenFileDescription&) const { return {}; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue