ret = ioctl(f->fd, SG_IO, hdr);
if (ret < 0)
- return -errno;
+ return ret;
return FIO_Q_COMPLETED;
}
ret = write(f->fd, hdr, sizeof(*hdr));
if (ret < 0)
- return errno;
+ return ret;
if (sync) {
ret = read(f->fd, hdr, sizeof(*hdr));
if (ret < 0)
- return -errno;
+ return ret;
return FIO_Q_COMPLETED;
}