errno = 0;
rv = fscanf(fd, "%d", &ret);
if (rv < 0) {
- ERR("Error! Failed to read from file, rv:[%d], error:[%s]",
- rv, strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
- fclose(fd);
- return -1;
+ // EINVAL is not error -> https://bugzilla.redhat.com/show_bug.cgi?id=1253797
+ if (errno == EINVAL) {
+ ret = 0;
+ } else {
+ ERR("Error! Failed to read from file, rv:[%d], error:[%s]",
+ rv, strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
+ fclose(fd);
+ return -1;
+ }
}
if (ret == 1) {