diff options
| author | 2019-01-16 03:12:23 +0100 | |
|---|---|---|
| committer | 2019-01-27 18:47:36 +0100 | |
| commit | 26692e12fc929c9e7572719825b24b5fe375570d (patch) | |
| tree | 48544ee9bcb4174773f2d6a7fa4ec0c4c3432200 | |
| parent | 2a275241545e5b3e0e65eb3453a868d90dfa414d (diff) | |
| download | libirecovery-26692e12fc929c9e7572719825b24b5fe375570d.tar.gz libirecovery-26692e12fc929c9e7572719825b24b5fe375570d.tar.bz2 | |
irecovery: Allow passing ECID in hex or decimal
| -rw-r--r-- | tools/irecovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/irecovery.c b/tools/irecovery.c index 2db6f4f..280be7a 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c | |||
| @@ -348,7 +348,7 @@ static void print_usage(int argc, char **argv) { | |||
| 348 | printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); | 348 | printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); |
| 349 | printf("Interact with an iOS device in DFU or recovery mode.\n\n"); | 349 | printf("Interact with an iOS device in DFU or recovery mode.\n\n"); |
| 350 | printf("options:\n"); | 350 | printf("options:\n"); |
| 351 | printf(" -i ECID\tconnect to specific device by its hexadecimal ECID\n"); | 351 | printf(" -i ECID\tconnect to specific device by its ECID\n"); |
| 352 | printf(" -c CMD\trun CMD on device\n"); | 352 | printf(" -c CMD\trun CMD on device\n"); |
| 353 | printf(" -m\t\tprint current device mode\n"); | 353 | printf(" -m\t\tprint current device mode\n"); |
| 354 | printf(" -f FILE\tsend file to device\n"); | 354 | printf(" -f FILE\tsend file to device\n"); |
| @@ -386,7 +386,7 @@ int main(int argc, char* argv[]) { | |||
| 386 | case 'i': | 386 | case 'i': |
| 387 | if (optarg) { | 387 | if (optarg) { |
| 388 | char* tail = NULL; | 388 | char* tail = NULL; |
| 389 | ecid = strtoull(optarg, &tail, 16); | 389 | ecid = strtoull(optarg, &tail, 0); |
| 390 | if (tail && (tail[0] != '\0')) { | 390 | if (tail && (tail[0] != '\0')) { |
| 391 | ecid = 0; | 391 | ecid = 0; |
| 392 | } | 392 | } |
