mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +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
Notes:
sideshowbarker
2024-07-17 16:22:19 +09:00
Author: https://github.com/supercomputer7
Commit: ae2ec45e78
Pull-request: https://github.com/SerenityOS/serenity/pull/13400
3 changed files with 7 additions and 1 deletions
|
@ -137,7 +137,7 @@ InodeMetadata SysFSInode::metadata() const
|
|||
metadata.mode = S_IFREG | m_associated_component->permissions();
|
||||
metadata.uid = 0;
|
||||
metadata.gid = 0;
|
||||
metadata.size = 0;
|
||||
metadata.size = m_associated_component->size();
|
||||
metadata.mtime = mepoch;
|
||||
return metadata;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue