vold: If we're bootstrapping, don't automatically mount the SD card. Also fixes some
error display bugs (our printf doesnt support %m)
Signed-off-by: San Mehat <san@google.com>
diff --git a/vold/vold.c b/vold/vold.c
index 7d50a2f..11b99a9 100644
--- a/vold/vold.c
+++ b/vold/vold.c
@@ -53,6 +53,8 @@
static pthread_mutex_t write_mutex = PTHREAD_MUTEX_INITIALIZER;
static int fw_sock = -1;
+int bootstrap = 0;
+
int main(int argc, char **argv)
{
int door_sock = -1;
@@ -108,6 +110,7 @@
* Bootstrap
*/
+ bootstrap = 1;
// Volume Manager
volmgr_bootstrap();
@@ -120,6 +123,7 @@
// Switch
switch_bootstrap();
+ bootstrap = 0;
/*
* Main loop
*/