Fixes for devices with internal FAT file system:
Only share a single partition via UMS if a specific partition
is specified in vold.fstab (rather than "auto")
Do not fail to reformat if MBR cannot be found.
Change-Id: I544ca2ee325c308af656ab9f4732c788a964c156
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/Volume.cpp b/Volume.cpp
index 190b64b..1577ba9 100644
--- a/Volume.cpp
+++ b/Volume.cpp
@@ -144,6 +144,10 @@
return MKDEV(0, 0);
};
+dev_t Volume::getShareDevice() {
+ return getDiskDevice();
+}
+
void Volume::handleVolumeShared() {
}
@@ -220,7 +224,9 @@
if (initializeMbr(devicePath)) {
SLOGE("Failed to initialize MBR (%s)", strerror(errno));
- goto err;
+// goto err;
+// don't treat this as a fatal error
+// lets continue on and format the partition
}
sprintf(devicePath, "/dev/block/vold/%d:%d",