diff options
Diffstat (limited to 'tools/ideviceenterrecovery.c')
| -rw-r--r-- | tools/ideviceenterrecovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c index 21c4ff6..69484cc 100644 --- a/tools/ideviceenterrecovery.c +++ b/tools/ideviceenterrecovery.c | |||
| @@ -37,7 +37,7 @@ static void print_usage(int argc, char **argv) | |||
| 37 | 37 | ||
| 38 | name = strrchr(argv[0], '/'); | 38 | name = strrchr(argv[0], '/'); |
| 39 | printf("Usage: %s [OPTIONS] UDID\n", (name ? name + 1: argv[0])); | 39 | printf("Usage: %s [OPTIONS] UDID\n", (name ? name + 1: argv[0])); |
| 40 | printf("Makes a device with the supplied 40-digit UDID enter recovery mode immediately.\n\n"); | 40 | printf("Makes a device with the supplied UDID enter recovery mode immediately.\n\n"); |
| 41 | printf(" -d, --debug\t\tenable communication debugging\n"); | 41 | printf(" -d, --debug\t\tenable communication debugging\n"); |
| 42 | printf(" -h, --help\t\tprints usage information\n"); | 42 | printf(" -h, --help\t\tprints usage information\n"); |
| 43 | printf("\n"); | 43 | printf("\n"); |
| @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) | |||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | i--; | 68 | i--; |
| 69 | if (!argv[i] || (strlen(argv[i]) != 40)) { | 69 | if (argc < 2 || !argv[i] || !*argv[i]) { |
| 70 | print_usage(argc, argv); | 70 | print_usage(argc, argv); |
| 71 | return 0; | 71 | return 0; |
| 72 | } | 72 | } |
