diff options
author | Nikias Bassen | 2012-02-02 20:14:31 +0100 |
---|---|---|
committer | Nikias Bassen | 2012-02-02 20:14:31 +0100 |
commit | 5421b825d98a0e84f7336e24083bbc4f123d00f6 (patch) | |
tree | 9c26ab62d5672259c758d96c11152fdb62f13b21 /src | |
parent | 93cc13ff963fbc97d96b466db745f213a727003d (diff) | |
download | idevicerestore-5421b825d98a0e84f7336e24083bbc4f123d00f6.tar.gz idevicerestore-5421b825d98a0e84f7336e24083bbc4f123d00f6.tar.bz2 |
recovery: improve recovery_send_kernelcache
Diffstat (limited to 'src')
-rw-r--r-- | src/recovery.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/recovery.c b/src/recovery.c index 3833b2a..54ea14f 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -338,8 +338,10 @@ int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t bu const char* component = "RestoreKernelCache"; irecv_error_t recovery_error = IRECV_E_SUCCESS; - if (recovery_client_new(client) < 0) { - return -1; + if (client->recovery == NULL) { + if (recovery_client_new(client) < 0) { + return -1; + } } if (recovery_send_component(client, build_identity, component) < 0) { @@ -347,6 +349,13 @@ int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t bu return -1; } + if (client->restore_boot_args) { + char setba[256]; + strcpy(setba, "setenv boot-args "); + strcat(setba, client->restore_boot_args); + recovery_error = irecv_send_command(client->recovery->client, setba); + } + recovery_error = irecv_send_command(client->recovery->client, "bootx"); if (recovery_error != IRECV_E_SUCCESS) { error("ERROR: Unable to execute %s\n", component); |