From 1fef0f0fa81b09796155e3e613ecbd0fb4c1fd28 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 16 Jan 2019 20:33:12 -0500 Subject: [PATCH] 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.) --- src/system/boot/loader/partitions.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/system/boot/loader/partitions.cpp b/src/system/boot/loader/partitions.cpp index cfcaaa7639..ee8d2321ea 100644 --- a/src/system/boot/loader/partitions.cpp +++ b/src/system/boot/loader/partitions.cpp @@ -357,7 +357,7 @@ Partition::Scan(bool mountFileSystems, bool isBootDevice) } // find the best FS module - const file_system_module_info *bestFSModule = NULL; + file_system_module_info *bestFSModule = NULL; float bestFSPriority = -1; for (int32 i = 0; i < sNumFileSystemModules; i++) { if (sFileSystemModules[i]->identify_file_system == NULL) @@ -426,12 +426,8 @@ Partition::Scan(bool mountFileSystems, bool isBootDevice) } // scan for file systems - - if (mountFileSystems) { - // TODO: Use the FS module we've got, if any. Requires to implement the - // identify_file_system() hook in every FS. - return Mount(); - } + if (mountFileSystems) + return _Mount(bestFSModule, NULL); return B_ENTRY_NOT_FOUND; }