summaryrefslogtreecommitdiffstats
path: root/tools/ideviceimagemounter.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-10-11 22:12:04 +0200
committerGravatar Nikias Bassen2014-10-11 22:12:04 +0200
commitfd43544a9251fcc698b0002967d45c251c203bb2 (patch)
treef9b9c6f82a37bd386914eb1986349bb8b799e4cd /tools/ideviceimagemounter.c
parent75b0ba0d69bff5de42fb21ccd5650b78c2997dfa (diff)
downloadlibimobiledevice-fd43544a9251fcc698b0002967d45c251c203bb2.tar.gz
libimobiledevice-fd43544a9251fcc698b0002967d45c251c203bb2.tar.bz2
tools: Make sure to print an error when lockdown connection fails
Diffstat (limited to 'tools/ideviceimagemounter.c')
-rw-r--r--tools/ideviceimagemounter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c
index 29d25d7..9ce25c9 100644
--- a/tools/ideviceimagemounter.c
+++ b/tools/ideviceimagemounter.c
@@ -138,6 +138,7 @@ int main(int argc, char **argv)
{
idevice_t device = NULL;
lockdownd_client_t lckd = NULL;
+ lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR;
mobile_image_mounter_client_t mim = NULL;
afc_client_t afc = NULL;
lockdownd_service_descriptor_t service = NULL;
@@ -172,8 +173,8 @@ int main(int argc, char **argv)
return -1;
}
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter")) {
- printf("ERROR: could not connect to lockdown. Exiting.\n");
+ if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter"))) {
+ printf("ERROR: Could not connect to lockdown, error code %d.\n", ldret);
goto leave;
}