Kernel/ProcFS: Add S_IFREG bit to regular files in /proc

Regular files should have regular file mode.
This commit is contained in:
Andreas Kling 2021-07-28 18:55:38 +02:00
parent 898b8ffcb6
commit 58f62cd1d0
Notes: sideshowbarker 2024-07-18 07:59:51 +09:00

View file

@ -130,7 +130,7 @@ InodeMetadata ProcFSInode::metadata() const
MutexLocker locker(m_inode_lock);
InodeMetadata metadata;
metadata.inode = { fsid(), m_associated_component->component_index() };
metadata.mode = m_associated_component->required_mode();
metadata.mode = S_IFREG | m_associated_component->required_mode();
metadata.uid = m_associated_component->owner_user();
metadata.gid = m_associated_component->owner_group();
metadata.size = m_associated_component->size();