Prints also the Windows GetLastError() in strerror().

This commit is contained in:
Andrea Mazzoleni 2013-04-04 19:30:24 +02:00
parent 9d4f988f95
commit a85aa08276
4 changed files with 40 additions and 3 deletions

View file

@ -393,7 +393,7 @@ int parity_read(struct snapraid_parity* parity, block_off_t pos, unsigned char*
read_ret = read(parity->f, block_buffer + count, block_size - count);
#endif
if (read_ret < 0) {
fprintf(out, "Error reading file '%s' at offset %"PRIu64". %s.\n", parity->path, offset, strerror(errno));
fprintf(out, "Error reading file '%s' at offset %"PRIu64" for size %u. %s.\n", parity->path, offset + count, block_size - count, strerror(errno));
return -1;
}
if (read_ret == 0) {