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:
parent
1fb6e24f19
commit
4a48581851
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue