bootloader: Use the already-detected filesystem module...
...rather than enumerating again. Solves a TODO (all filesystems save tarfs and packagefs, which require special parameters and of course will not be on standard "partitions", have implemented the required function.)
This commit is contained in:
@@ -357,7 +357,7 @@ Partition::Scan(bool mountFileSystems, bool isBootDevice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find the best FS module
|
// find the best FS module
|
||||||
const file_system_module_info *bestFSModule = NULL;
|
file_system_module_info *bestFSModule = NULL;
|
||||||
float bestFSPriority = -1;
|
float bestFSPriority = -1;
|
||||||
for (int32 i = 0; i < sNumFileSystemModules; i++) {
|
for (int32 i = 0; i < sNumFileSystemModules; i++) {
|
||||||
if (sFileSystemModules[i]->identify_file_system == NULL)
|
if (sFileSystemModules[i]->identify_file_system == NULL)
|
||||||
@@ -426,12 +426,8 @@ Partition::Scan(bool mountFileSystems, bool isBootDevice)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// scan for file systems
|
// scan for file systems
|
||||||
|
if (mountFileSystems)
|
||||||
if (mountFileSystems) {
|
return _Mount(bestFSModule, NULL);
|
||||||
// TODO: Use the FS module we've got, if any. Requires to implement the
|
|
||||||
// identify_file_system() hook in every FS.
|
|
||||||
return Mount();
|
|
||||||
}
|
|
||||||
|
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user