ret = fsync(io_u->file->fd);
if (ret != (int) io_u->xfer_buflen) {
- if (ret > 0) {
+ if (ret >= 0) {
io_u->resid = io_u->xfer_buflen - ret;
io_u->error = 0;
return FIO_Q_COMPLETED;
}
if (io_u->error)
- td_verror(td, io_u->error);
+ td_verror(td, io_u->error, "xfer");
return FIO_Q_COMPLETED;
}
struct spliceio_data *sd = malloc(sizeof(*sd));
if (pipe(sd->pipe) < 0) {
- td_verror(td, errno);
+ td_verror(td, errno, "pipe");
free(sd);
return 1;
}