module load: don't processed /vendor in fastbootd if not required
Change-Id: Ia81af8187c135df93b7aa0ad83de2a79b63a384b
diff --git a/twrp.cpp b/twrp.cpp
index 5109914..5cb2209 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -99,6 +99,8 @@
static void process_fastbootd_mode() {
LOGINFO("starting fastboot\n");
+
+#ifdef TW_LOAD_VENDOR_MODULES
printf("=> Linking mtab\n");
symlink("/proc/mounts", "/etc/mtab");
std::string fstab_filename = "/etc/twrp.fstab";
@@ -113,7 +115,6 @@
TWPartition* ven = PartitionManager.Find_Partition_By_Path("/vendor");
PartitionManager.Setup_Super_Devices();
PartitionManager.Prepare_Super_Volume(ven);
-#ifdef TW_LOAD_VENDOR_MODULES
KernelModuleLoader::Load_Vendor_Modules();
if (android::base::GetBoolProperty("ro.virtual_ab.enabled", false)) {
PartitionManager.Unmap_Super_Devices();