mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Kernel: Added unmount ability to VFS
It is now possible to unmount file systems from the VFS via `umount`. It works via looking up the `fsid` of the filesystem from the `Inode`'s metatdata so I'm not sure how fragile it is. It seems to work for now though as something to get us going.
This commit is contained in:
committed by
Andreas Kling
parent
f7251c74a9
commit
bc22456f89
@@ -59,6 +59,7 @@ public:
|
||||
bool mount_root(NonnullRefPtr<FS>&&);
|
||||
KResult mount(NonnullRefPtr<FS>&&, StringView path);
|
||||
KResult mount(NonnullRefPtr<FS>&&, Custody& mount_point);
|
||||
KResult unmount(NonnullRefPtr<FS>&&);
|
||||
|
||||
KResultOr<NonnullRefPtr<FileDescription>> open(StringView path, int options, mode_t mode, Custody& base);
|
||||
KResultOr<NonnullRefPtr<FileDescription>> create(StringView path, int options, mode_t mode, Custody& parent_custody);
|
||||
@@ -105,6 +106,8 @@ private:
|
||||
Mount* find_mount_for_host(InodeIdentifier);
|
||||
Mount* find_mount_for_guest(InodeIdentifier);
|
||||
|
||||
Lock m_lock { "VFSLock" };
|
||||
|
||||
RefPtr<Inode> m_root_inode;
|
||||
NonnullOwnPtrVector<Mount> m_mounts;
|
||||
HashMap<u32, Device*> m_devices;
|
||||
|
||||
Reference in New Issue
Block a user