summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-06-27 02:05:02 +0200
committerGravatar Nikias Bassen2022-06-27 02:05:02 +0200
commit170a17e6b8c577a59dc0a001c09cfd7a02347720 (patch)
tree0f898c114bfc26d226c5e157247709b44b2c3950
parenteff9fab5db946903ae8706d7ec6809176c7ca8b5 (diff)
downloadidevicerestore-170a17e6b8c577a59dc0a001c09cfd7a02347720.tar.gz
idevicerestore-170a17e6b8c577a59dc0a001c09cfd7a02347720.tar.bz2
ipsw: Improve error message when fwrite fails
-rw-r--r--src/ipsw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipsw.c b/src/ipsw.c
index f861241..78064b8 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -442,7 +442,7 @@ int ipsw_extract_to_file_with_progress(const char* ipsw, const char* infile, con
break;
}
if (fwrite(buffer, 1, count, fd) != count) {
- error("ERROR: frite: %s\n", outfile);
+ error("ERROR: Writing to '%s' failed: %s\n", outfile, strerror(errno));
ret = -1;
break;
}
@@ -515,7 +515,7 @@ int ipsw_extract_to_file_with_progress(const char* ipsw, const char* infile, con
break;
}
if (fwrite(buffer, 1, r, fo) != r) {
- error("ERROR: fwrite failed\n");
+ error("ERROR: Writing to '%s' failed: %s\n", actual_outfile, strerror(errno));
ret = -1;
break;
}