mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Kernel/Devices: Introduce the LoopDevice device
This device is a block device that allows a user to effectively treat an Inode as a block device. The static construction method is given an OpenFileDescription reference but validates that: - The description has a valid custody (so it's not some arbitrary file). Failing this requirement will yield EINVAL. - The description custody points to an Inode which is a regular file, as we only support (seekable) regular files. Failing this requirement will yield ENOTSUP. LoopDevice can be used to mount a regular file on the filesystem like other supported types of (physical) block devices.
This commit is contained in:
parent
a9d240c647
commit
5dcf03ad9a
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/supercomputer7
Commit: 5dcf03ad9a
Pull-request: https://github.com/SerenityOS/serenity/pull/23138
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/gmta
12 changed files with 254 additions and 4 deletions
|
@ -115,6 +115,7 @@ public:
|
|||
virtual bool is_socket() const { return false; }
|
||||
virtual bool is_inode_watcher() const { return false; }
|
||||
virtual bool is_mount_file() const { return false; }
|
||||
virtual bool is_loop_device() const { return false; }
|
||||
|
||||
virtual bool is_regular_file() const { return false; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue