1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

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
parent 548a880310
commit ed5b3f8495
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() };