ladybird/Kernel/FileSystem/SysFS
Liav A a10e63f08e Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes
SysFS, ProcFS and DevPtsFS were all sending filetype 0 when traversing
their directories, but it is actually very easy to send proper filetypes
in these filesystems.
This patch binds all RAM backed filesystems to use only one enum for
their internal filetype, to simplify the implementation and allow
sharing of code.
Please note that the Plan9FS case is currently not solved as I am not
familiar with this filesystem and its constructs.

The ProcFS mostly keeps track of the filetype, and a fix was needed for
the /proc root directory - all processes exhibit a directory inside it
which makes it very easy to hardcode the directory filetype for them.
There's also the `self` symlink inode which is now exposed as DT_LNK.

As for SysFS, we could leverage the fact everything inherits from the
SysFSComponent class, so we could have a virtual const method to return
the proper filetype.
Most of the files in SysFS are "regular" files though, so the base class
has a non-pure virtual method.

Lastly, the DevPtsFS simply hardcodes '.' and '..' as directory file
type, and everything else is hardcoded to send the character device file
type, as this filesystem is only exposing character pts device files.
2024-01-13 19:01:07 -07:00
..
Subsystems Kernel: Add initial basic support for KASAN 2023-12-30 13:57:10 +01:00
Component.cpp Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
Component.h Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
DirectoryInode.cpp Kernel/SysFS: Fix bizarre mode bits for directories in SysFS 2023-12-01 20:46:21 +01:00
DirectoryInode.h Kernel: Switch LockRefPtr<Inode> to RefPtr<Inode> 2023-03-09 21:54:59 +01:00
FileSystem.cpp Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
FileSystem.h Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
Inode.cpp Kernel: Use UnixDateTime wherever applicable 2023-05-24 23:18:07 +02:00
Inode.h Kernel: Use UnixDateTime wherever applicable 2023-05-24 23:18:07 +02:00
LinkInode.cpp Kernel: Switch LockRefPtr<Inode> to RefPtr<Inode> 2023-03-09 21:54:59 +01:00
LinkInode.h Kernel: Switch LockRefPtr<Inode> to RefPtr<Inode> 2023-03-09 21:54:59 +01:00
Registry.cpp Kernel: Get rid of *LockRefPtr in the SysFS filesystem code 2023-04-14 19:24:54 +02:00
Registry.h Kernel: Get rid of *LockRefPtr in the SysFS filesystem code 2023-04-14 19:24:54 +02:00
RootDirectory.cpp Kernel: Get rid of *LockRefPtr in the SysFS filesystem code 2023-04-14 19:24:54 +02:00
RootDirectory.h Kernel: Get rid of *LockRefPtr in the SysFS filesystem code 2023-04-14 19:24:54 +02:00