summaryrefslogtreecommitdiffstats
path: root/Volume.cpp
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-11-19 10:20:37 -0800
committerJean-Baptiste Queru <jbq@google.com>2010-11-19 10:20:37 -0800
commit1206e872ce74aab253c39c3547bfaadc5e1f6011 (patch)
treea98aed4569df620e437e4920d246241d3531dac0 /Volume.cpp
parent92c243afae15567f166d0059db5aff13b8849596 (diff)
parent09f774b7d3ad4e4205485b6997d44f7edd084598 (diff)
downloadsystem_vold-1206e872ce74aab253c39c3547bfaadc5e1f6011.zip
system_vold-1206e872ce74aab253c39c3547bfaadc5e1f6011.tar.gz
system_vold-1206e872ce74aab253c39c3547bfaadc5e1f6011.tar.bz2
resolved conflicts for merge of 09f774b7 to gingerbread-plus-aosp
Change-Id: I103db47198ad09783aa6539cde271df0fdb9c594
Diffstat (limited to 'Volume.cpp')
-rw-r--r--Volume.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Volume.cpp b/Volume.cpp
index d2b87b6..ecf7dcd 100644
--- a/Volume.cpp
+++ b/Volume.cpp
@@ -218,6 +218,7 @@ int Volume::formatVol() {
setState(Volume::State_Formatting);
+ int ret = -1;
// Only initialize the MBR if we are formatting the entire device
if (formatEntireDevice) {
sprintf(devicePath, "/dev/block/vold/%d:%d",
@@ -241,10 +242,11 @@ int Volume::formatVol() {
goto err;
}
- setState(Volume::State_Idle);
- return 0;
+ ret = 0;
+
err:
- return -1;
+ setState(Volume::State_Idle);
+ return ret;
}
bool Volume::isMountpointMounted(const char *path) {