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)
138{ 138{
139 idevice_t device = NULL; 139 idevice_t device = NULL;
140 lockdownd_client_t lckd = NULL; 140 lockdownd_client_t lckd = NULL;
141 lockdownd_error_t ldret = LOCKDOWN_E_UNKNOWN_ERROR;
141 mobile_image_mounter_client_t mim = NULL; 142 mobile_image_mounter_client_t mim = NULL;
142 afc_client_t afc = NULL; 143 afc_client_t afc = NULL;
143 lockdownd_service_descriptor_t service = NULL; 144 lockdownd_service_descriptor_t service = NULL;
@@ -172,8 +173,8 @@ int main(int argc, char **argv)
172 return -1; 173 return -1;
173 } 174 }
174 175
175 if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter")) { 176 if (LOCKDOWN_E_SUCCESS != (ldret = lockdownd_client_new_with_handshake(device, &lckd, "ideviceimagemounter"))) {
176 printf("ERROR: could not connect to lockdown. Exiting.\n"); 177 printf("ERROR: Could not connect to lockdown, error code %d.\n", ldret);
177 goto leave; 178 goto leave;
178 } 179 }
179 180