summaryrefslogtreecommitdiffstats
path: root/tools/idevicesetlocation.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2025-06-07 11:27:05 +0200
committerGravatar Nikias Bassen2025-06-07 11:27:05 +0200
commit72456f241ef49932a1c1e673059564d6f7ec3aad (patch)
tree3cb3eee9c0de4ea788d7445feb930e792d69c50e /tools/idevicesetlocation.c
parenteae0cd26b0aac975737393fb7d87efc871a0f5c2 (diff)
downloadlibimobiledevice-72456f241ef49932a1c1e673059564d6f7ec3aad.tar.gz
libimobiledevice-72456f241ef49932a1c1e673059564d6f7ec3aad.tar.bz2
idevicesetlocation: Return positive values from main()
Diffstat (limited to 'tools/idevicesetlocation.c')
-rw-r--r--tools/idevicesetlocation.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/idevicesetlocation.c b/tools/idevicesetlocation.c
index a23b8e4..d7dbd28 100644
--- a/tools/idevicesetlocation.c
+++ b/tools/idevicesetlocation.c
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
113 113
114 if ((argc > 2) || (argc < 1)) { 114 if ((argc > 2) || (argc < 1)) {
115 print_usage(argc+optind, argv-optind, 1); 115 print_usage(argc+optind, argv-optind, 1);
116 return -1; 116 return 1;
117 } 117 }
118 118
119 if (argc == 2) { 119 if (argc == 2) {
@@ -123,7 +123,7 @@ int main(int argc, char **argv)
123 mode = RESET_LOCATION; 123 mode = RESET_LOCATION;
124 } else { 124 } else {
125 print_usage(argc+optind, argv-optind, 1); 125 print_usage(argc+optind, argv-optind, 1);
126 return -1; 126 return 1;
127 } 127 }
128 } 128 }
129 129
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
135 } else { 135 } else {
136 printf("ERROR: No device found!\n"); 136 printf("ERROR: No device found!\n");
137 } 137 }
138 return -1; 138 return 1;
139 } 139 }
140 140
141 lockdownd_client_t lockdown = NULL; 141 lockdownd_client_t lockdown = NULL;
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
143 if (lerr != LOCKDOWN_E_SUCCESS) { 143 if (lerr != LOCKDOWN_E_SUCCESS) {
144 idevice_free(device); 144 idevice_free(device);
145 printf("ERROR: Could not connect to lockdownd: %s (%d)\n", lockdownd_strerror(lerr), lerr); 145 printf("ERROR: Could not connect to lockdownd: %s (%d)\n", lockdownd_strerror(lerr), lerr);
146 return -1; 146 return 1;
147 } 147 }
148 148
149 lockdownd_service_descriptor_t svc = NULL; 149 lockdownd_service_descriptor_t svc = NULL;
@@ -152,7 +152,7 @@ int main(int argc, char **argv)
152 lockdownd_client_free(lockdown); 152 lockdownd_client_free(lockdown);
153 idevice_free(device); 153 idevice_free(device);
154 printf("ERROR: Could not start the simulatelocation service: %s\nMake sure a developer disk image is mounted!\n", lockdownd_strerror(lerr)); 154 printf("ERROR: Could not start the simulatelocation service: %s\nMake sure a developer disk image is mounted!\n", lockdownd_strerror(lerr));
155 return -1; 155 return 1;
156 } 156 }
157 lockdownd_client_free(lockdown); 157 lockdownd_client_free(lockdown);
158 158
@@ -165,7 +165,7 @@ int main(int argc, char **argv)
165 if (serr != SERVICE_E_SUCCESS) { 165 if (serr != SERVICE_E_SUCCESS) {
166 idevice_free(device); 166 idevice_free(device);
167 printf("ERROR: Could not connect to simulatelocation service (%d)\n", serr); 167 printf("ERROR: Could not connect to simulatelocation service (%d)\n", serr);
168 return -1; 168 return 1;
169 } 169 }
170 170
171 uint32_t l; 171 uint32_t l;