summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiuqin Wang <xiuqin.wang@mediatek.com>2020-08-11 14:49:39 +0800
committerLyon Wang <lyon.wang@mediatek.com>2024-04-17 14:54:35 +0800
commit22fa53488a0b50ad42a3125f4d63a04b85978462 (patch)
treeee5e8094c2828906004072dd445b71eac1a17a5a
parente76fb7a81010b5ecb42450566465b31e66dc5270 (diff)
downloadvold-22fa53488a0b50ad42a3125f4d63a04b85978462.tar.gz
Fix some special usb can't mount issue.
[Description] The usb has invalid partition table, but vold thinks it has partition. So vold not to treat entire disk as partition. Bug: 160433451 [Test Report] Build pass. The special usb can mount ok. Change-Id: I0b0e761641f6961e69d7d7f7fbc58d33eeab3a08
-rw-r--r--model/Disk.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/model/Disk.cpp b/model/Disk.cpp
index 4df4e9dd..01cd0c36 100644
--- a/model/Disk.cpp
+++ b/model/Disk.cpp
@@ -365,7 +365,6 @@ status_t Disk::readPartitions() {
continue;
}
} else if (*it == "PART") {
- foundParts = true;
if (++it == split.end()) continue;
int i = 0;
@@ -390,6 +389,7 @@ status_t Disk::readPartitions() {
case 0x0c: // W95 FAT32 (LBA)
case 0x0e: // W95 FAT16 (LBA)
createPublicVolume(partDevice);
+ foundParts = true;
break;
}
} else if (table == Table::kGpt) {
@@ -400,8 +400,10 @@ status_t Disk::readPartitions() {
if (android::base::EqualsIgnoreCase(typeGuid, kGptBasicData)) {
createPublicVolume(partDevice);
+ foundParts = true;
} else if (android::base::EqualsIgnoreCase(typeGuid, kGptAndroidExpand)) {
createPrivateVolume(partDevice, partGuid);
+ foundParts = true;
}
}
}