diff options
author | Martin Szulecki | 2021-03-19 00:08:21 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-06-13 02:01:11 +0200 |
commit | 2efd3adbe498e02ee53cee092b71a0c88ee53231 (patch) | |
tree | 45bda1aabc068699e8a166c3858572130c66b427 /tools | |
parent | c3e1048f25c5bca7cea5b05b480013d1b3a3d89b (diff) | |
download | libirecovery-2efd3adbe498e02ee53cee092b71a0c88ee53231.tar.gz libirecovery-2efd3adbe498e02ee53cee092b71a0c88ee53231.tar.bz2 |
irecovery: Output product, model and marketing name for device information
Diffstat (limited to 'tools')
-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 244f961..392f912 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c @@ -135,6 +135,7 @@ static void print_hex(unsigned char *buf, size_t len) static void print_device_info(irecv_client_t client) { int ret, mode; + irecv_device_t device = NULL; const struct irecv_device_info *devinfo = irecv_get_device_info(client); if (devinfo) { printf("CPID: 0x%04x\n", devinfo->cpid); @@ -177,6 +178,13 @@ static void print_device_info(irecv_client_t client) if (ret == IRECV_E_SUCCESS) { printf("MODE: %s\n", mode_to_str(mode)); } + + irecv_devices_get_device_by_client(client, &device); + if (device) { + printf("PRODUCT: %s\n", device->product_type); + printf("MODEL: %s\n", device->hardware_model); + printf("NAME: %s\n", device->display_name); + } } static void print_devices() { |