Merge "Fix some special usb can't mount issue." into main

This commit is contained in:
Treehugger Robot 2024-04-17 16:22:37 +00:00 committed by Gerrit Code Review
commit 77f8b00c3d

View file

@ -365,7 +365,6 @@ status_t Disk::readPartitions() {
continue; continue;
} }
} else if (*it == "PART") { } else if (*it == "PART") {
foundParts = true;
if (++it == split.end()) continue; if (++it == split.end()) continue;
int i = 0; int i = 0;
@ -390,6 +389,7 @@ status_t Disk::readPartitions() {
case 0x0c: // W95 FAT32 (LBA) case 0x0c: // W95 FAT32 (LBA)
case 0x0e: // W95 FAT16 (LBA) case 0x0e: // W95 FAT16 (LBA)
createPublicVolume(partDevice); createPublicVolume(partDevice);
foundParts = true;
break; break;
} }
} else if (table == Table::kGpt) { } else if (table == Table::kGpt) {
@ -400,8 +400,10 @@ status_t Disk::readPartitions() {
if (android::base::EqualsIgnoreCase(typeGuid, kGptBasicData)) { if (android::base::EqualsIgnoreCase(typeGuid, kGptBasicData)) {
createPublicVolume(partDevice); createPublicVolume(partDevice);
foundParts = true;
} else if (android::base::EqualsIgnoreCase(typeGuid, kGptAndroidExpand)) { } else if (android::base::EqualsIgnoreCase(typeGuid, kGptAndroidExpand)) {
createPrivateVolume(partDevice, partGuid); createPrivateVolume(partDevice, partGuid);
foundParts = true;
} }
} }
} }