summaryrefslogtreecommitdiffstats
path: root/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-11-03 22:41:52 +0100
committerGravatar Nikias Bassen2011-11-03 22:41:52 +0100
commit15e2b3c5e6f7daf55da66756f9529bdeeb454197 (patch)
treeed9ee1312a8bc26e8c80481d5e1dbf83dbeaf91c /libirecovery.c
parentbd7728153d4606c8271d152c6f08143bdd1c505e (diff)
downloadlibirecovery-15e2b3c5e6f7daf55da66756f9529bdeeb454197.tar.gz
libirecovery-15e2b3c5e6f7daf55da66756f9529bdeeb454197.tar.bz2
add new device models
Diffstat (limited to 'libirecovery.c')
-rw-r--r--libirecovery.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libirecovery.c b/libirecovery.c
index 614b81d..278a529 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -1224,6 +1224,35 @@ irecv_error_t irecv_get_device(irecv_client_t client, irecv_device_t* device) {
}
break;
+ case CPID_IPAD21:
+ // iPad2,1 iPad2,2 iPad2,3 and iPhone4,1 share the same ChipID, so we need to check the BoardID
+ if (irecv_get_bdid(client, &bdid) < 0) {
+ break;
+ }
+
+ switch (bdid) {
+ case BDID_IPAD21
+ device_id = DEVICE_IPAD21;
+ break;
+
+ case BDID_IPAD22
+ device_id = DEVICE_IPAD22;
+ break;
+
+ case BDID_IPAD23
+ device_id = DEVICE_IPAD23;
+ break;
+
+ case BDID_IPHONE4S
+ device_id = DEVICE_IPHONE4S;
+ break;
+
+ default:
+ device_id = DEVICE_UNKNOWN;
+ break;
+ }
+ break;
+
default:
device_id = DEVICE_UNKNOWN;
break;