diff options
| author | 2019-12-04 11:15:47 +0100 | |
|---|---|---|
| committer | 2019-12-04 11:15:47 +0100 | |
| commit | 7ff3385719244906c1da9fe41d307347c175f226 (patch) | |
| tree | 6c4daa78ed2a998fd2ef65fa06cd240eaaf479df /tools/irecovery.c | |
| parent | d8b193aac5994b0119394d5f7b02eeb28b78e8d1 (diff) | |
| download | libirecovery-7ff3385719244906c1da9fe41d307347c175f226.tar.gz libirecovery-7ff3385719244906c1da9fe41d307347c175f226.tar.bz2 | |
tools: Parse and print PWND string in irecovery device info output if present
Diffstat (limited to 'tools/irecovery.c')
| -rw-r--r-- | tools/irecovery.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/irecovery.c b/tools/irecovery.c index 7ea331d..6ee89b0 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c | |||
| @@ -158,6 +158,14 @@ static void print_device_info(irecv_client_t client) | |||
| 158 | printf("N/A"); | 158 | printf("N/A"); |
| 159 | } | 159 | } |
| 160 | printf("\n"); | 160 | printf("\n"); |
| 161 | char* p = strstr(devinfo->serial_string, "PWND:["); | ||
| 162 | if (p) { | ||
| 163 | p+=6; | ||
| 164 | char* pend = strchr(p, ']'); | ||
| 165 | if (pend) { | ||
| 166 | printf("PWND: %.*s\n", (int)(pend-p), p); | ||
| 167 | } | ||
| 168 | } | ||
| 161 | } else { | 169 | } else { |
| 162 | printf("Could not get device info?!\n"); | 170 | printf("Could not get device info?!\n"); |
| 163 | } | 171 | } |
