Skip to content

Commit

Permalink
DAOS-14805 dfuse: Correctly propagate errors in ioil. (daos-stack#13515)
Browse files Browse the repository at this point in the history
Fix an issue where all errors would be mapped to 1 (EPERM)

Signed-off-by: Ashley Pittman <[email protected]>
  • Loading branch information
ashleypittman authored Jan 2, 2024
1 parent 3ed5863 commit 17bc886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client/dfuse/il/int_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ dfuse_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
if (nread != nmemb)
entry->fd_eof = true;
} else if (bytes_read < 0) {
entry->fd_err = bytes_read;
entry->fd_err = errcode;
} else {
entry->fd_eof = true;
}
Expand Down Expand Up @@ -2239,7 +2239,7 @@ dfuse_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
nwrite = bytes_written / size;
entry->fd_pos = oldpos + (nwrite * size);
} else if (bytes_written < 0) {
entry->fd_err = bytes_written;
entry->fd_err = errcode;
}

vector_decref(&fd_table, entry);
Expand Down

0 comments on commit 17bc886

Please sign in to comment.