summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2020-06-04 03:17:44 +0200
committerGravatar Martin Szulecki2020-06-04 03:17:44 +0200
commite31ee8dda8f7acfd185f28ec663a4d7a93bfd04c (patch)
tree0b4c89e0d9a6159fa3e274b454c92d771b6de6da /tools
parent9e1cfe984a4481c2251cd2cbdbab11d610fc1821 (diff)
downloadlibimobiledevice-e31ee8dda8f7acfd185f28ec663a4d7a93bfd04c.tar.gz
libimobiledevice-e31ee8dda8f7acfd185f28ec663a4d7a93bfd04c.tar.bz2
Use defined exit codes for return codes in idevicediagnostics
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicediagnostics.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/idevicediagnostics.c b/tools/idevicediagnostics.c
index a23ff8b..052bbed 100644
--- a/tools/idevicediagnostics.c
+++ b/tools/idevicediagnostics.c
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
diagnostics_relay_client_t diagnostics_client = NULL;
lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR;
lockdownd_service_descriptor_t service = NULL;
- int result = -1;
+ int result = EXIT_FAILURE;
int i;
const char *udid = NULL;
int cmd = CMD_NONE;
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
i++;
if (!argv[i] || !*argv[i]) {
print_usage(argc, argv);
- result = 0;
+ result = EXIT_SUCCESS;
goto cleanup;
}
udid = argv[i];
@@ -95,7 +95,7 @@ int main(int argc, char **argv)
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
print_usage(argc, argv);
- result = 0;
+ result = EXIT_SUCCESS;
goto cleanup;
}
else if (!strcmp(argv[i], "sleep")) {
@@ -174,7 +174,7 @@ int main(int argc, char **argv)
}
else {
print_usage(argc, argv);
- return 0;
+ return EXIT_SUCCESS;
}
}
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
lockdownd_client_free(lockdown_client);
- result = -1;
+ result = EXIT_FAILURE;
if ((ret == LOCKDOWN_E_SUCCESS) && service && (service->port > 0)) {
if (diagnostics_relay_client_new(device, service, &diagnostics_client) != DIAGNOSTICS_RELAY_E_SUCCESS) {