Commit 1fdcdb7c authored by Matt Mower's avatar Matt Mower Committed by Dees Troy
Browse files

partitions: Avoid duplicate UMS mounts

If a device has several LUN but only one storage volume TWRP
recognizes (e.g. lun0 for microsd and lun1 for emulated cdrom), then
avoid mounting the same partition twice by checking the mount point.

Change-Id: Ie23b88acca1818873792e9f65b73b125a15e4a5d
parent 209c9635
......@@ -1595,7 +1595,7 @@ int TWPartitionManager::usb_storage_enable(void) {
}
sprintf(lun_file, CUSTOM_LUN_FILE, 1);
Mount2 = Find_Next_Storage(Mount1->Mount_Point, true);
if (Mount2) {
if (Mount2 && Mount2->Mount_Point != Mount1->Mount_Point) {
Open_Lun_File(Mount2->Mount_Point, lun_file);
}
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment