summaryrefslogtreecommitdiffstats
path: root/sdcard/sdcard.c
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-06-30 16:02:40 -0700
committerJeff Sharkey <jsharkey@android.com>2015-06-30 16:02:52 -0700
commit4a4858185177616707dda7ab562f45a0a8494e3f (patch)
tree48e0797ea53ee8c32049c898ed40633a0b240d9b /sdcard/sdcard.c
parent1fb6e24f19533c2d7bfa1e8e69443d752e9df3ce (diff)
downloadsystem_core-4a4858185177616707dda7ab562f45a0a8494e3f.zip
system_core-4a4858185177616707dda7ab562f45a0a8494e3f.tar.gz
system_core-4a4858185177616707dda7ab562f45a0a8494e3f.tar.bz2
Gracefully handle ENODEV in sdcard daemon.
When someone force-unmounts our target endpoint, gracefully handle by terminating, instead of looping on the same errno forever. Bug: 22197797 Change-Id: I7e71632f69d47152ea78a94431c23ae69aba9b93
Diffstat (limited to 'sdcard/sdcard.c')
-rw-r--r--sdcard/sdcard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index a136232..3cd5bc4 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1510,6 +1510,10 @@ static void handle_fuse_requests(struct fuse_handler* handler)
if (errno != EINTR) {
ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
}
+ if (errno == ENODEV) {
+ ERROR("[%d] someone stole our marbles!\n", handler->token);
+ exit(2);
+ }
continue;
}