mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 13:00:29 +00:00
Kernel: Set file size for smbios_entry_point and DMI blobs in ProcFS
This is needed to support dmidecode version 3.3, so it can read the 2 blobs in ProcFS.
This commit is contained in:
parent
338c6eec65
commit
65c27bfe52
Notes:
sideshowbarker
2024-07-18 22:39:04 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/65c27bfe52d Pull-request: https://github.com/SerenityOS/serenity/pull/5163 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/bcoles Reviewed-by: https://github.com/linusg
3 changed files with 19 additions and 0 deletions
|
@ -70,6 +70,15 @@ DMIExpose& DMIExpose::the()
|
|||
return *s_the;
|
||||
}
|
||||
|
||||
size_t DMIExpose::entry_point_length() const
|
||||
{
|
||||
return m_entry_point_length;
|
||||
}
|
||||
size_t DMIExpose::structure_table_length() const
|
||||
{
|
||||
return m_structure_table_length;
|
||||
}
|
||||
|
||||
void DMIExpose::initialize_exposer()
|
||||
{
|
||||
ASSERT(!(m_entry_point.is_null()));
|
||||
|
|
|
@ -85,6 +85,8 @@ public:
|
|||
bool is_available() const { return m_available; }
|
||||
OwnPtr<KBuffer> entry_point() const;
|
||||
OwnPtr<KBuffer> structure_table() const;
|
||||
size_t entry_point_length() const;
|
||||
size_t structure_table_length() const;
|
||||
|
||||
private:
|
||||
void set_64_bit_entry_initialization_values();
|
||||
|
|
|
@ -1176,6 +1176,14 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
case FI_PID_stacks:
|
||||
metadata.mode = S_IFDIR | S_IRUSR | S_IXUSR;
|
||||
break;
|
||||
case FI_Root_smbios_entry_point:
|
||||
metadata.mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
|
||||
metadata.size = DMIExpose::the().entry_point_length();
|
||||
break;
|
||||
case FI_Root_dmi:
|
||||
metadata.mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
|
||||
metadata.size = DMIExpose::the().structure_table_length();
|
||||
break;
|
||||
default:
|
||||
metadata.mode = S_IFREG | S_IRUSR | S_IRGRP | S_IROTH;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue