Merge m-c to birch

This commit is contained in:
Phil Ringnalda 2013-05-27 09:57:56 -07:00
commit f1e7983df8

View File

@ -232,8 +232,13 @@ GonkDiskSpaceWatcher::OnFileCanReadWithoutBlocking(int aFd)
len = read(aFd, buf, sizeof(buf));
} while(len == -1 && errno == EINTR);
// Bail out if the file is busy.
if (len < 0 && errno == ETXTBSY) {
return;
}
// We should get an exact multiple of fanotify_event_metadata
if (len <= 0 || (len % sizeof(*fem) != 0)) {
if (len <= 0 || (len % FAN_EVENT_METADATA_LEN != 0)) {
printf_stderr("About to crash: fanotify_event_metadata read error.");
MOZ_CRASH();
}