am 3574b085: Merge "cryptfs: log umount() failure reason" into lmp-dev

* commit '3574b085f46a5b22ee660a9fd3ef727a20c106ee':
  cryptfs: log umount() failure reason
This commit is contained in:
Greg Hackmann 2014-09-24 23:35:42 +00:00 committed by Android Git Automerger
commit e46f7122e0

View file

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