Merge "Use errno correctly."

This commit is contained in:
Elliott Hughes 2015-08-17 17:33:35 +00:00 committed by Gerrit Code Review
commit f298f6be4c

View file

@ -103,10 +103,11 @@ int Loop::lookupActive(const char *id, char *buffer, size_t len) {
}
rc = ioctl(fd, LOOP_GET_STATUS64, &li);
close(fd);
if (rc < 0 && errno == ENXIO) {
close(fd);
continue;
}
close(fd);
if (rc < 0) {
SLOGE("Unable to get loop status for %s (%s)", filename,