From b34e3435c21d06b3e5a4e7b5246fb6ddb6641a9f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 1 Oct 2018 02:32:51 +0200 Subject: 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 ""). --- tools/idevicebackup2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/idevicebackup2.c') diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 7fb67df..6d4785b 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c @@ -1323,7 +1323,7 @@ static void print_usage(int argc, char **argv) printf("\n"); printf("options:\n"); printf(" -d, --debug\t\tenable communication debugging\n"); - printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n"); + printf(" -u, --udid UDID\ttarget specific device by UDID\n"); printf(" -s, --source UDID\tuse backup data from device specified by UDID\n"); printf(" -i, --interactive\trequest passwords interactively\n"); printf(" -h, --help\t\tprints usage information\n"); @@ -1369,7 +1369,7 @@ int main(int argc, char *argv[]) } else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) { i++; - if (!argv[i] || (strlen(argv[i]) != 40)) { + if (!argv[i] || !*argv[i]) { print_usage(argc, argv); return -1; } @@ -1378,7 +1378,7 @@ int main(int argc, char *argv[]) } else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--source")) { i++; - if (!argv[i] || (strlen(argv[i]) != 40)) { + if (!argv[i] || !*argv[i]) { print_usage(argc, argv); return -1; } -- cgit v1.1-32-gdbae