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/DirectVolume.cpp b/DirectVolume.cpp
index 1f9f084..ce5b892 100644
--- a/DirectVolume.cpp
+++ b/DirectVolume.cpp
@@ -65,6 +65,14 @@
return MKDEV(mDiskMajor, mDiskMinor);
}
+dev_t DirectVolume::getShareDevice() {
+ if (mPartIdx != -1) {
+ return MKDEV(mDiskMajor, mPartIdx);
+ } else {
+ return MKDEV(mDiskMajor, mDiskMinor);
+ }
+}
+
void DirectVolume::handleVolumeShared() {
setState(Volume::State_Shared);
}