1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

Kernel: Make RAMFS pass along the inode type when traversing as a dir

RAMFS was passing 0, which lead to the userspace seeing all entries as
DT_UNKNOWN when iterating over the directory contents.
To repro prior to this commit, simply check `echo /tmp/*/`.
This commit is contained in:
Ali Mohammad Pur 2023-12-01 21:07:25 +03:30 committed by Andreas Kling
parent 24a7df9b09
commit b545427d53
3 changed files with 63 additions and 4 deletions

View file

@ -27,6 +27,19 @@ public:
virtual Inode& root_inode() override;
virtual u8 internal_file_type_to_directory_entry_type(DirectoryEntryView const& entry) const override;
enum class FileType : u8 {
Directory,
Character,
Block,
Regular,
FIFO,
Link,
Socket,
Unknown,
};
private:
RAMFS();