mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 03:47:34 +00:00
Kernel/ProcFS: Tighten modified time value across the filesystem objects
It didn't make any sense to hardcode the modified time of all created inodes with "mepoch", so we should query the procfs "backend" to get the modified time value. Since ProcFS is dynamically changed all the time, the modified time equals to the querying time. This could be changed if desired, by making the modified_time() method virtual and overriding it in different procfs-backed objects :)
This commit is contained in:
parent
d79d9e833e
commit
1f98d7d638
2 changed files with 4 additions and 3 deletions
|
@ -145,7 +145,7 @@ InodeMetadata ProcFSInode::metadata() const
|
|||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = m_associated_component->size();
|
||||
metadata.mtime = mepoch;
|
||||
metadata.mtime = m_associated_component->modified_time();
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ InodeMetadata ProcFSDirectoryInode::metadata() const
|
|||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = mepoch;
|
||||
metadata.mtime = m_associated_component->modified_time();
|
||||
return metadata;
|
||||
}
|
||||
KResult ProcFSDirectoryInode::traverse_as_directory(Function<bool(const FS::DirectoryEntryView&)> callback) const
|
||||
|
@ -258,7 +258,7 @@ InodeMetadata ProcFSLinkInode::metadata() const
|
|||
metadata.uid = m_associated_component->owner_user();
|
||||
metadata.gid = m_associated_component->owner_group();
|
||||
metadata.size = 0;
|
||||
metadata.mtime = mepoch;
|
||||
metadata.mtime = m_associated_component->modified_time();
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue