summaryrefslogtreecommitdiffstats
path: root/Volume.cpp
diff options
context:
space:
mode:
authorOran Avraham <oranav@gmail.com>2012-11-02 18:18:48 +0200
committerOran Avraham <oranav@gmail.com>2012-11-02 18:18:48 +0200
commit3e61f1d12494ac0f456623681f12edf9b356245f (patch)
tree7048d110687d801d0f538bf46b96c19ac3dc0c11 /Volume.cpp
parent42c34c801f918507397754f185f85d79d8558d39 (diff)
downloadsystem_vold-3e61f1d12494ac0f456623681f12edf9b356245f.zip
system_vold-3e61f1d12494ac0f456623681f12edf9b356245f.tar.gz
system_vold-3e61f1d12494ac0f456623681f12edf9b356245f.tar.bz2
UMS support with any volume, not only primary (1/3)
This patch enables UMS support when any volume supports it, even when the primary storage doesn't. 1. Vold: assign lun_numbers sequentially to the volumes being added to the VolumeManager. 2. Fix portions of code which assume that the device has UMS support iff the primary storage supports UMS. Instead, determine whether the device supports UMS by checking each volume. 3. Display the UMS option in Settings.apk when any volume supports it. Change-Id: I3976ee4a26f1ae7bd3faee814d3740312588f4c8 Signed-off-by: Oran Avraham <oranav@gmail.com>
Diffstat (limited to 'Volume.cpp')
-rw-r--r--Volume.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Volume.cpp b/Volume.cpp
index b38f3b5..0e4f277 100644
--- a/Volume.cpp
+++ b/Volume.cpp
@@ -123,6 +123,7 @@ Volume::Volume(VolumeManager *vm, const char *label, const char *mount_point) {
mCurrentlyMountedKdev = -1;
mPartIdx = -1;
mRetryMount = false;
+ mLunNumber = -1;
property_get("persist.sys.vold.switchexternal", switchable, "0");
if (!strcmp(switchable,"1")) {
@@ -200,6 +201,10 @@ bool Volume::isPrimaryStorage() {
return !strcmp(getMountpoint(), externalStorage);
}
+void Volume::setLunNumber(int lunNumber) {
+ mLunNumber = lunNumber;
+}
+
void Volume::setState(int state) {
char msg[255];
int oldState = mState;