summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-02-07 16:59:25 +0100
committerGravatar Nikias Bassen2012-02-07 16:59:25 +0100
commit829c6cc434e9d89a42bc9fb6dce3f4e320cd6e2d (patch)
tree6233cd860099986313efee37c2c0ac4928763429 /src/idevicerestore.c
parent284c497680a84906575920efa5352764934925ff (diff)
downloadidevicerestore-829c6cc434e9d89a42bc9fb6dce3f4e320cd6e2d.tar.gz
idevicerestore-829c6cc434e9d89a42bc9fb6dce3f4e320cd6e2d.tar.bz2
restore: find actual device by checking device serial number
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 2ecf0fb..c838041 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -687,6 +687,10 @@ int main(int argc, char* argv[]) {
// now finally do the magic to put the device into restore mode
if (client->mode->index == MODE_RECOVERY) {
+ if (client->srnm == NULL) {
+ error("ERROR: could not retrieve device serial number. Can't continue.\n");
+ return -1;
+ }
if (recovery_enter_restore(client, build_identity) < 0) {
error("ERROR: Unable to place device into restore mode\n");
plist_free(buildmanifest);