path: root/tools/ideviceinfo.c
diff options
authorGravatar Nikias Bassen2018-10-01 02:32:51 +0200
committerGravatar Nikias Bassen2018-10-01 02:32:51 +0200
commitb34e3435c21d06b3e5a4e7b5246fb6ddb6641a9f (patch)
tree89b78560cd956b956a03c9b207816d8cb345c37e /tools/ideviceinfo.c
parentf1ee0fd8b2b1dd65c64f5a67e208efc708295caa (diff)
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/ideviceinfo.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index 40bcac6..59fade8 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -91,7 +91,7 @@ static void print_usage(int argc, char **argv)
printf("Show information about a connected device.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
printf(" -s, --simple\t\tuse a simple connection to avoid auto-pairing with the device\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(" -q, --domain NAME\tset domain of query to NAME. Default: None\n");
printf(" -k, --key NAME\tonly query key specified by NAME. Default: All keys.\n");
printf(" -x, --xml\t\toutput information as xml plist instead of key/value pairs\n");
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
- if (!argv[i] || (strlen(argv[i]) != 40)) {
+ if (!argv[i] || !*argv[i]) {
print_usage(argc, argv);
return 0;