diff options
author | 2022-02-04 02:15:56 +0100 | |
---|---|---|
committer | 2022-02-04 02:15:56 +0100 | |
commit | a64fcc3988f75cb4fc2388013c245e5e884bb96f (patch) | |
tree | 1b122ace4e0c658fbb80a2980a86eabc1114e0d2 /tools/idevicesetlocation.c | |
parent | ac89a1fed5ad916c81bca1515b10934e3e01b057 (diff) | |
download | libimobiledevice-a64fcc3988f75cb4fc2388013c245e5e884bb96f.tar.gz libimobiledevice-a64fcc3988f75cb4fc2388013c245e5e884bb96f.tar.bz2 |
tools: Print meaningful error messages when service startup fails
Diffstat (limited to 'tools/idevicesetlocation.c')
-rw-r--r-- | tools/idevicesetlocation.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/idevicesetlocation.c b/tools/idevicesetlocation.c index 412b47c..6237a1a 100644 --- a/tools/idevicesetlocation.c +++ b/tools/idevicesetlocation.c | |||
@@ -141,10 +141,11 @@ int main(int argc, char **argv) | |||
141 | lockdownd_client_new_with_handshake(device, &lockdown, TOOL_NAME); | 141 | lockdownd_client_new_with_handshake(device, &lockdown, TOOL_NAME); |
142 | 142 | ||
143 | lockdownd_service_descriptor_t svc = NULL; | 143 | lockdownd_service_descriptor_t svc = NULL; |
144 | if (lockdownd_start_service(lockdown, DT_SIMULATELOCATION_SERVICE, &svc) != LOCKDOWN_E_SUCCESS) { | 144 | lockdownd_error_t lerr = lockdownd_start_service(lockdown, DT_SIMULATELOCATION_SERVICE, &svc); |
145 | if (lerr != LOCKDOWN_E_SUCCESS) { | ||
145 | lockdownd_client_free(lockdown); | 146 | lockdownd_client_free(lockdown); |
146 | idevice_free(device); | 147 | idevice_free(device); |
147 | printf("ERROR: Could not start the simulatelocation service. Make sure a developer disk image is mounted!\n"); | 148 | printf("ERROR: Could not start the simulatelocation service: %s\nMake sure a developer disk image is mounted!\n", lockdownd_strerror(lerr)); |
148 | return -1; | 149 | return -1; |
149 | } | 150 | } |
150 | lockdownd_client_free(lockdown); | 151 | lockdownd_client_free(lockdown); |