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
This commit is contained in:
committed by
Gerrit Code Review
parent
cbe764c42b
commit
ee71706ad1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user