diff options
author | Nikias Bassen | 2014-03-14 14:52:19 +0100 |
---|---|---|
committer | Nikias Bassen | 2014-03-14 14:52:19 +0100 |
commit | 7aa87fe71df068e798fe002ac785477d4e22c918 (patch) | |
tree | 23f6633e2ba584863a940ebc468114d99e0e3fc3 /src/ideviceinstaller.c | |
parent | 613ec55ae6441c0177859ac7f49b92a133979465 (diff) | |
download | ideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.gz ideviceinstaller-7aa87fe71df068e798fe002ac785477d4e22c918.tar.bz2 |
print AFC error code in case afc_file_write fails
Diffstat (limited to 'src/ideviceinstaller.c')
-rw-r--r-- | src/ideviceinstaller.c | 5 |
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; |