diff --git a/util/opts/log.c b/util/opts/log.c index 6b0dcd7..82177bb 100644 --- a/util/opts/log.c +++ b/util/opts/log.c @@ -91,6 +91,8 @@ int ioctl_retried(const char *name, int fd, int request, void *arg) for (int try = 0; try <= MAX_RETRIES; try++) { int ret = ioctl(fd, request, arg); + if (ret >= 0) + return ret; if (errno != EINTR && errno != EAGAIN && errno != ETIMEDOUT) return ret; usleep(RETRY_INTERVAL_US);