From a64fcc3988f75cb4fc2388013c245e5e884bb96f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 4 Feb 2022 02:15:56 +0100 Subject: tools: Print meaningful error messages when service startup fails --- tools/idevicesetlocation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/idevicesetlocation.c') 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) lockdownd_client_new_with_handshake(device, &lockdown, TOOL_NAME); lockdownd_service_descriptor_t svc = NULL; - if (lockdownd_start_service(lockdown, DT_SIMULATELOCATION_SERVICE, &svc) != LOCKDOWN_E_SUCCESS) { + lockdownd_error_t lerr = lockdownd_start_service(lockdown, DT_SIMULATELOCATION_SERVICE, &svc); + if (lerr != LOCKDOWN_E_SUCCESS) { lockdownd_client_free(lockdown); idevice_free(device); - printf("ERROR: Could not start the simulatelocation service. Make sure a developer disk image is mounted!\n"); + printf("ERROR: Could not start the simulatelocation service: %s\nMake sure a developer disk image is mounted!\n", lockdownd_strerror(lerr)); return -1; } lockdownd_client_free(lockdown); -- cgit v1.1-32-gdbae