feat: support for USB mass storage devices, hotplugging

This commit is contained in:
2026-05-18 17:47:12 +02:00
parent f8e8af1d78
commit 41d2841cc9
36 changed files with 1537 additions and 130 deletions
+10 -2
View File
@@ -18,12 +18,20 @@ namespace Fs::FsProbe {
// Register a filesystem probe function (called once per FS driver at init).
void Register(ProbeFn fn);
// Probe all discovered GPT partitions and auto-mount recognized filesystems.
// Assigns VFS drive numbers starting from firstDrive.
// Probe all discovered storage partitions and auto-mount recognized filesystems.
// Assigns each partition the lowest available VFS drive number at or above firstDrive.
void MountPartitions(int firstDrive = 1);
// Probe discovered partitions for a single block device and mount recognized
// filesystems at the lowest currently available VFS drive numbers.
int MountPartitionsForBlockDevice(int blockDevIndex, int firstDrive = 0);
// Try to mount a single partition (by global partition index) as the given VFS drive.
// Returns 0 on success, -1 if no probe recognized the filesystem.
int MountPartition(int partIndex, int driveNum);
// Unmount every VFS drive backed by partitions on a block device and compact
// mount bookkeeping to match Gpt::RemovePartitionsForBlockDevice().
int UnmountPartitionsForBlockDevice(int blockDevIndex);
};