am 6b6c1bd9: Gracefully handle ENODEV in sdcard daemon (part deux)

* commit '6b6c1bd996be7b7b640ef9b074435620f73eecac':
  Gracefully handle ENODEV in sdcard daemon (part deux)
This commit is contained in:
Mark Salyzyn 2015-07-06 22:57:00 +00:00 committed by Android Git Automerger
commit 609c7acd08
1 changed files with 3 additions and 5 deletions

View File

@ -1513,16 +1513,14 @@ static void handle_fuse_requests(struct fuse_handler* handler)
{
struct fuse* fuse = handler->fuse;
for (;;) {
ssize_t len = read(fuse->fd,
handler->request_buffer, sizeof(handler->request_buffer));
ssize_t len = TEMP_FAILURE_RETRY(read(fuse->fd,
handler->request_buffer, sizeof(handler->request_buffer)));
if (len < 0) {
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);
}
ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
continue;
}