diff options
author | Martin Szulecki | 2012-07-17 17:14:26 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 17:14:26 +0200 |
commit | cab3c2cf81226b142e80e210106fedae571ef307 (patch) | |
tree | 8ea9df131fac293bc50451c025f3f8954a51600e /src/idevicerestore.c | |
parent | 599f072004da1307a017499c10ac44af224a4f76 (diff) | |
download | idevicerestore-cab3c2cf81226b142e80e210106fedae571ef307.tar.gz idevicerestore-cab3c2cf81226b142e80e210106fedae571ef307.tar.bz2 |
main: Add detection of new models in check_device()
Diffstat (limited to 'src/idevicerestore.c')
-rw-r--r-- | src/idevicerestore.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c index bbd7462..a6fba99 100644 --- a/src/idevicerestore.c +++ b/src/idevicerestore.c @@ -962,6 +962,46 @@ int check_device(struct idevicerestore_client_t* client) { } break; + case CPID_APPLETV31: + if (get_bdid(client, &bdid) < 0) { + error("ERROR: Unable to get device BDID\n"); + break; + } + switch (bdid) { + case BDID_APPLETV31: + device = DEVICE_APPLETV31; + break; + case BDID_IPAD24: + device = DEVICE_IPAD24; + break; + default: + device = DEVICE_UNKNOWN; + break; + } + break; + + case CPID_IPAD31: + // A5X devices + if (get_bdid(client, &bdid) < 0) { + error("ERROR: Unable to get device BDID\n"); + break; + } + switch (bdid) { + case BDID_IPAD31: + device = DEVICE_IPAD31; + break; + case BDID_IPAD32: + device = DEVICE_IPAD32; + break; + case BDID_IPAD33: + device = DEVICE_IPAD33; + break; + default: + device = DEVICE_UNKNOWN; + break; + } + break; + default: device = DEVICE_UNKNOWN; break; |