summaryrefslogtreecommitdiffstats
path: root/tools/irecovery.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-12-04 11:15:47 +0100
committerGravatar Nikias Bassen2019-12-04 11:15:47 +0100
commit7ff3385719244906c1da9fe41d307347c175f226 (patch)
tree6c4daa78ed2a998fd2ef65fa06cd240eaaf479df /tools/irecovery.c
parentd8b193aac5994b0119394d5f7b02eeb28b78e8d1 (diff)
downloadlibirecovery-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.c8
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)
printf("N/A");
}
printf("\n");
+ char* p = strstr(devinfo->serial_string, "PWND:[");
+ if (p) {
+ p+=6;
+ char* pend = strchr(p, ']');
+ if (pend) {
+ printf("PWND: %.*s\n", (int)(pend-p), p);
+ }
+ }
} else {
printf("Could not get device info?!\n");
}