summaryrefslogtreecommitdiffstats
path: root/tools/idevicecrashreport.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2018-10-01 02:32:51 +0200
committerGravatar Nikias Bassen2018-10-01 02:32:51 +0200
commitb34e3435c21d06b3e5a4e7b5246fb6ddb6641a9f (patch)
tree89b78560cd956b956a03c9b207816d8cb345c37e /tools/idevicecrashreport.c
parentf1ee0fd8b2b1dd65c64f5a67e208efc708295caa (diff)
downloadlibimobiledevice-b34e3435c21d06b3e5a4e7b5246fb6ddb6641a9f.tar.gz
libimobiledevice-b34e3435c21d06b3e5a4e7b5246fb6ddb6641a9f.tar.bz2
tools: Remove length check on device UDID arguments to support newer devices
The 40 characters length check on the device UDID made newer devices unusable with the libimobiledevice tools and was actually redundant since an invalid UDID will always fail to resolve. This commit removes the length check alltogether (but makes sure it is not an empty string "").
Diffstat (limited to 'tools/idevicecrashreport.c')
-rw-r--r--tools/idevicecrashreport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c
index 4d7f41c..e05d506 100644
--- a/tools/idevicecrashreport.c
+++ b/tools/idevicecrashreport.c
@@ -301,7 +301,7 @@ static void print_usage(int argc, char **argv)
301 printf(" -e, --extract\t\textract raw crash report into separate '.crash' file\n"); 301 printf(" -e, --extract\t\textract raw crash report into separate '.crash' file\n");
302 printf(" -k, --keep\t\tcopy but do not remove crash reports from device\n"); 302 printf(" -k, --keep\t\tcopy but do not remove crash reports from device\n");
303 printf(" -d, --debug\t\tenable communication debugging\n"); 303 printf(" -d, --debug\t\tenable communication debugging\n");
304 printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n"); 304 printf(" -u, --udid UDID\ttarget specific device by UDID\n");
305 printf(" -h, --help\t\tprints usage information\n"); 305 printf(" -h, --help\t\tprints usage information\n");
306 printf("\n"); 306 printf("\n");
307 printf("Homepage: <" PACKAGE_URL ">\n"); 307 printf("Homepage: <" PACKAGE_URL ">\n");
@@ -327,7 +327,7 @@ int main(int argc, char* argv[]) {
327 } 327 }
328 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) { 328 else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
329 i++; 329 i++;
330 if (!argv[i] || (strlen(argv[i]) != 40)) { 330 if (!argv[i] || !*argv[i]) {
331 print_usage(argc, argv); 331 print_usage(argc, argv);
332 return 0; 332 return 0;
333 } 333 }