mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 10:34:58 +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
|
@ -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