|
|
@ -1428,7 +1428,7 @@ static int create_encrypted_random_key(char *passwd, unsigned char *master_key,
|
|
|
|
|
|
|
|
|
|
|
|
static int wait_and_unmount(char *mountpoint)
|
|
|
|
static int wait_and_unmount(char *mountpoint)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i, rc;
|
|
|
|
int i, err, rc;
|
|
|
|
#define WAIT_UNMOUNT_COUNT 20
|
|
|
|
#define WAIT_UNMOUNT_COUNT 20
|
|
|
|
|
|
|
|
|
|
|
|
/* Now umount the tmpfs filesystem */
|
|
|
|
/* Now umount the tmpfs filesystem */
|
|
|
@ -1440,6 +1440,7 @@ static int wait_and_unmount(char *mountpoint)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
err = errno;
|
|
|
|
sleep(1);
|
|
|
|
sleep(1);
|
|
|
|
i++;
|
|
|
|
i++;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -1452,7 +1453,7 @@ static int wait_and_unmount(char *mountpoint)
|
|
|
|
rc = 0;
|
|
|
|
rc = 0;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
vold_killProcessesWithOpenFiles(mountpoint, 0);
|
|
|
|
vold_killProcessesWithOpenFiles(mountpoint, 0);
|
|
|
|
SLOGE("unmounting %s failed\n", mountpoint);
|
|
|
|
SLOGE("unmounting %s failed: %s\n", mountpoint, strerror(err));
|
|
|
|
rc = -1;
|
|
|
|
rc = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|