summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-06-07 02:24:08 -0400
committerGravatar Joshua Hill2010-06-07 02:24:08 -0400
commita91e336c24a0d741e47be7adf0cd0b2beb20e5ab (patch)
treeb114cc3ab2369805ece1c169684a7f95ffdf7d3b /src/idevicerestore.c
parent255b285d22056dde283d33511c14387ea92e28c0 (diff)
downloadidevicerestore-a91e336c24a0d741e47be7adf0cd0b2beb20e5ab.tar.gz
idevicerestore-a91e336c24a0d741e47be7adf0cd0b2beb20e5ab.tar.bz2
I really need to put more descriptive messages here, but im doing stuff all over the place
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r--src/idevicerestore.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 0e77447..a1faeac 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -137,11 +137,12 @@ int main(int argc, char* argv[]) {
}
// discover the device type
- idevicerestore_device = check_device(uuid);
- if (idevicerestore_device < 0) {
+ int id = check_device(uuid);
+ if (id < 0) {
error("ERROR: Unable to discover device type\n");
return -1;
}
+ idevicerestore_device = &idevicerestore_devices[id];
// extract buildmanifest
plist_t buildmanifest = NULL;
@@ -178,7 +179,7 @@ int main(int argc, char* argv[]) {
// devices that come after iPod2g require personalized firmwares
plist_t tss_request = NULL;
plist_t tss = NULL;
- if (idevicerestore_device > DEVICE_IPOD2G) {
+ if (idevicerestore_device->device_id > DEVICE_IPOD2G) {
info("Creating TSS request\n");
// fetch the device's ECID for the TSS request
if (get_ecid(uuid, &ecid) < 0 || ecid == 0) {