summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2021-03-19 00:08:21 +0100
committerGravatar Martin Szulecki2021-06-05 17:15:57 +0200
commit4430a7f35dbc6d995794debc7994d18e3ff26967 (patch)
tree134875ba829cfa4f73db086ad257b5a9010a0ee8
parent8fafdc3a17477e2c2fd48fa233c014300f70574c (diff)
downloadlibirecovery-4430a7f35dbc6d995794debc7994d18e3ff26967.tar.gz
libirecovery-4430a7f35dbc6d995794debc7994d18e3ff26967.tar.bz2
irecovery: Output product, model and marketing name for device informationlist-devices
-rw-r--r--tools/irecovery.c8
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() {