diff options
Diffstat (limited to 'tools/idevice_id.c')
-rw-r--r-- | tools/idevice_id.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/idevice_id.c b/tools/idevice_id.c index 6f020ff..558dcbe 100644 --- a/tools/idevice_id.c +++ b/tools/idevice_id.c @@ -40,7 +40,7 @@ static void print_usage(int argc, char **argv) name = strrchr(argv[0], '/'); printf("Usage: %s [OPTIONS] [UDID]\n", (name ? name + 1: argv[0])); printf("Prints device name or a list of attached devices.\n\n"); - printf(" The UDID is a 40-digit hexadecimal number of the device\n"); + printf(" UDID is the unique device identifier of the device\n"); printf(" for which the name should be retrieved.\n\n"); printf(" -l, --list\t\tlist UDID of all attached devices\n"); printf(" -d, --debug\t\tenable communication debugging\n"); @@ -79,7 +79,7 @@ int main(int argc, char **argv) /* check if udid was passed */ if (mode == MODE_SHOW_ID) { i--; - if (!argv[i] || (strlen(argv[i]) != 40)) { + if (argc < 2 || !argv[i] || !*argv[i]) { print_usage(argc, argv); return 0; } @@ -90,7 +90,7 @@ int main(int argc, char **argv) case MODE_SHOW_ID: idevice_new(&device, udid); if (!device) { - fprintf(stderr, "ERROR: No device with UDID=%s attached.\n", udid); + fprintf(stderr, "ERROR: No device with UDID %s attached.\n", udid); return -2; } |