summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-03-14 14:52:19 +0100
committerGravatar Nikias Bassen2014-03-14 14:52:19 +0100
commit7aa87fe71df068e798fe002ac785477d4e22c918 (patch)
tree23f6633e2ba584863a940ebc468114d99e0e3fc3 /src
parent613ec55ae6441c0177859ac7f49b92a133979465 (diff)
downloadideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.gz
ideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.bz2
print AFC error code in case afc_file_write fails
Diffstat (limited to 'src')
-rw-r--r--src/ideviceinstaller.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index e1f995b..fc22446 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -491,8 +491,9 @@ static int afc_upload_file(afc_client_t afc, const char* filename, const char* d
uint32_t written, total = 0;
while (total < amount) {
written = 0;
- if (afc_file_write(afc, af, buf, amount, &written) != AFC_E_SUCCESS) {
- fprintf(stderr, "AFC Write error!\n");
+ afc_error_t aerr = afc_file_write(afc, af, buf, amount, &written);
+ if (aerr != AFC_E_SUCCESS) {
+ fprintf(stderr, "AFC Write error: %d\n", aerr);
break;
}
total += written;