From 955653ebff68e29f5aeab3f05fddc199474e4174 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Wed, 24 Sep 2014 14:55:20 -0700 Subject: [PATCH] cryptfs: log umount() failure reason Bug: 17576594 Change-Id: I7320aa597210896b4db6e663e1b2cb0c24d96557 Signed-off-by: Greg Hackmann --- cryptfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cryptfs.c b/cryptfs.c index cc1a52a..42d8bec 100644 --- a/cryptfs.c +++ b/cryptfs.c @@ -1428,7 +1428,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 */ @@ -1440,6 +1440,7 @@ static int wait_and_unmount(char *mountpoint) */ break; } + err = errno; sleep(1); i++; } else { @@ -1452,7 +1453,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; }