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

@ -220,7 +220,7 @@ int handle_read(struct snapraid_handle* handle, struct snapraid_block* block, un
#endif
if (read_ret < 0) {
fprintf(out, "Error reading file '%s' at offset %"PRIu64". %s.\n", handle->path, offset, strerror(errno));
fprintf(out, "Error reading file '%s' at offset %"PRIu64" for size %u. %s.\n", handle->path, offset + count, read_size - count, strerror(errno));
return -1;
}
if (read_ret == 0) {
@ -230,7 +230,6 @@ int handle_read(struct snapraid_handle* handle, struct snapraid_block* block, un
count += read_ret;
} while (count < read_size);
/* pad with 0 */
if (read_size < block_size) {