serenity/Kernel/FileSystem
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
..
DevPtsFS Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
Ext2FS Kernel/Ext2: Only handle extended attributes when they are supported 2024-01-05 04:00:11 +03:30
FATFS Kernel/FileSystem/FATFS: Use AssertSize to enforce FAT structure sizes 2024-01-12 15:54:46 -07:00
ISO9660FS Kernel/FileSystem: Rename block_size -> logical_block_size 2023-07-28 14:51:07 +02:00
Plan9FS Kernel: Don't allocate memory for names of processes and threads 2023-08-09 21:06:54 -06:00
ProcFS Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
RAMFS Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
SysFS Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
AnonymousFile.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
AnonymousFile.h Kernel: Use RefPtr instead of LockRefPtr for File and subclasses 2023-03-10 13:15:44 +01:00
BlockBasedFileSystem.cpp Kernel: Allow Ext2FS::flush_writes() to return ErrorOr<void> 2023-08-25 11:36:57 +01:00
BlockBasedFileSystem.h Kernel: Allow Ext2FS::flush_writes() to return ErrorOr<void> 2023-08-25 11:36:57 +01:00
Custody.cpp Kernel: Turn lock ranks into template parameters 2023-01-02 18:15:27 -05:00
Custody.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
FIFO.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
FIFO.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
File.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
File.h Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls 2023-07-02 01:04:51 +02:00
FileBackedFileSystem.cpp Kernel: Introduce support for using FileSystem object in multiple mounts 2022-10-22 16:57:52 -04:00
FileBackedFileSystem.h Kernel/FileSystem: Pass last mount point guest inode to unmount prepare 2023-07-15 00:12:01 +02:00
FileSystem.cpp Kernel/Ext2: Check and set file system state 2023-07-15 00:12:01 +02:00
FileSystem.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
Initializer.h Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls 2023-07-02 01:04:51 +02:00
Inode.cpp Kernel/FS: Fix check-then-act concurrency bug in FileSystem/Inode 2023-11-20 09:44:29 +01:00
Inode.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
InodeFile.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
InodeFile.h Kernel: Mark a bunch of NonnullRefPtrs also const to ensure immutability 2023-04-08 13:44:21 +02:00
InodeIdentifier.h Kernel: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
InodeMetadata.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
InodeMetadata.h Kernel: Populate stat.st_dev with fsid 2023-10-01 13:34:41 +02:00
InodeWatcher.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
InodeWatcher.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
Mount.cpp Kernel: Add accessor for mount host custody 2023-07-15 00:12:01 +02:00
Mount.h Kernel: Add accessor for mount host custody 2023-07-15 00:12:01 +02:00
MountFile.cpp Kernel: Use FixedStringBuffer for fixed-length strings in syscalls 2023-08-09 21:06:54 -06:00
MountFile.h Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls 2023-07-02 01:04:51 +02:00
OpenFileDescription.cpp Kernel: Move TTY-related code to a new subdirectory under Devices 2023-09-09 12:08:59 -06:00
OpenFileDescription.h Kernel+LibCore+LibC: Split the mount syscall into multiple syscalls 2023-07-02 01:04:51 +02:00
RAMBackedFileType.h Kernel/FileSystem: Send proper filetypes when traversing RAM-backed FSes 2024-01-13 19:01:07 -07:00
UnveilNode.h Everywhere: Move global Kernel pattern code to Kernel/Library directory 2023-06-04 21:32:34 +02:00
VirtualFileSystem.cpp Kernel: Run clang-format on a couple of FileSystem sources 2023-08-25 08:34:21 -04:00
VirtualFileSystem.h Kernel/VFS: Ensure working with mount entry per a custody is safe 2023-08-05 18:41:01 +02:00