summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-01-04 15:59:54 +0100
committerGravatar Nikias Bassen2024-01-04 15:59:54 +0100
commit29592eb6cae8b25b214aa1e3cfb6ef4a6d555d43 (patch)
tree43fb398f74498ef24b31b549743d225d284bf009 /tools
parent15fdc6ae46884208ef060dc84e32daa15e20ded8 (diff)
downloadlibirecovery-29592eb6cae8b25b214aa1e3cfb6ef4a6d555d43.tar.gz
libirecovery-29592eb6cae8b25b214aa1e3cfb6ef4a6d555d43.tar.bz2
Initialize KIS device in device callback
Also, print the detailed mode in irecovery -q and -m output.
Diffstat (limited to 'tools')
-rw-r--r--tools/irecovery.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/irecovery.c b/tools/irecovery.c
index 34e80bf..5546ac2 100644
--- a/tools/irecovery.c
+++ b/tools/irecovery.c
@@ -179,7 +179,14 @@ static void print_device_info(irecv_client_t client)
ret = irecv_get_mode(client, &mode);
if (ret == IRECV_E_SUCCESS) {
- printf("MODE: %s\n", mode_to_str(mode));
+ switch (devinfo->pid) {
+ case 0x1881:
+ printf("MODE: DFU via Debug USB (KIS)\n");
+ break;
+ default:
+ printf("MODE: %s\n", mode_to_str(mode));
+ break;
+ }
}
irecv_devices_get_device_by_client(client, &device);
@@ -630,11 +637,16 @@ int main(int argc, char* argv[])
}
break;
- case kShowMode:
+ case kShowMode: {
+ const struct irecv_device_info *devinfo = irecv_get_device_info(client);
irecv_get_mode(client, &mode);
- printf("%s Mode\n", mode_to_str(mode));
+ printf("%s Mode", mode_to_str(mode));
+ if (devinfo->pid == 0x1881) {
+ printf(" via Debug USB (KIS)");
+ }
+ printf("\n");
break;
-
+ }
case kRebootToNormalMode:
error = irecv_setenv(client, "auto-boot", "true");
if (error != IRECV_E_SUCCESS) {