From 398cae2678af07f202edff40494e5c39d06ff5d9 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 15:47:29 +0200 Subject: recovery: Actually print environment variables which are read --- src/recovery.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/recovery.c') diff --git a/src/recovery.c b/src/recovery.c index 9f4f200..40aef27 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -166,9 +166,20 @@ int recovery_enter_restore(struct idevicerestore_client_t* client, plist_t build return -1; } - irecv_send_command(client->recovery->client, "getenv build-version"); - irecv_send_command(client->recovery->client, "getenv build-style"); - irecv_send_command(client->recovery->client, "getenv radio-error"); + info("Recovery Mode Environment:\n"); + char* value = NULL; + irecv_getenv(client->recovery->client, "build-version", &value); + info("iBoot build-version=%s\n", value); + irecv_getenv(client->recovery->client, "build-style", &value); + info("iBoot build-style=%s\n", value); + unsigned long radio_error = 0; + irecv_getenv(client->recovery->client, "radio-error", &value); + radio_error = strtoul(value, NULL, 0); + if (radio_error > 0) { + info("radio-error=%s\n", value); + irecv_getenv(client->recovery->client, "radio-error-string", &value); + info("radio-error-string=%s\n", value); + } /* send logo and show it */ if (recovery_send_applelogo(client, build_identity) < 0) { -- cgit v1.1-32-gdbae