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
This commit is contained in:
Jeff Sharkey 2015-06-30 16:02:40 -07:00
parent 1fb6e24f19
commit 4a48581851

View file

@ -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;
}