feat: support for USB mass storage devices, hotplugging
This commit is contained in:
@@ -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);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user