From ee71706ad1cee8a3ee4231fcc7ef4ce8ab5cc05f Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 26 Apr 2014 01:46:46 -0500 Subject: Fix multiple lun file USB mounting Both the incorrect mount point and the incorrect lun file were being passed as the second storage volume. Change-Id: If9c7d92d1992ec022a2c89a82b2ea05c9150d635 --- partitionmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index b947d4307..9d8c27305 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1573,7 +1573,6 @@ int TWPartitionManager::Open_Lun_File(string Partition_Path, string Lun_File) { int TWPartitionManager::usb_storage_enable(void) { int has_dual, has_data_media; char lun_file[255]; - string ext_path; bool has_multiple_lun = false; DataManager::GetValue(TW_HAS_DATA_MEDIA, has_data_media); @@ -1608,9 +1607,10 @@ int TWPartitionManager::usb_storage_enable(void) { if (Mount1) { if (!Open_Lun_File(Mount1->Mount_Point, lun_file)) return false; + sprintf(lun_file, CUSTOM_LUN_FILE, 1); Mount2 = Find_Next_Storage(Mount1->Mount_Point, "/data"); if (Mount2) { - Open_Lun_File(ext_path, lun_file); + Open_Lun_File(Mount2->Mount_Point, lun_file); } } else { LOGERR("Unable to find storage partition to mount to USB\n"); -- cgit v1.2.3