Kernel: Specify directory entry types properly

...in a few more places, at least.

find(1) is about to start relying on the reported types more or less
reflecting reality. This is especially relevant for magic symlinks
in ProcFS.
This commit is contained in:
Sergey Bugaev 2021-08-18 14:55:54 +03:00 committed by Andreas Kling
commit ed5b3f8495
Notes: sideshowbarker 2024-07-18 05:31:41 +09:00
3 changed files with 14 additions and 14 deletions

View file

@ -218,8 +218,8 @@ KResult ProcFSExposedDirectory::traverse_as_directory(unsigned fsid, Function<bo
auto parent_directory = m_parent_directory.strong_ref();
if (parent_directory.is_null())
return KResult(EINVAL);
callback({ ".", { fsid, component_index() }, 0 });
callback({ "..", { fsid, parent_directory->component_index() }, 0 });
callback({ ".", { fsid, component_index() }, DT_DIR });
callback({ "..", { fsid, parent_directory->component_index() }, DT_DIR });
for (auto& component : m_components) {
InodeIdentifier identifier = { fsid, component.component_index() };