diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2012-11-23 22:08:45 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2012-11-23 22:08:45 +0100 |
commit | 8084f68b5063eaf2a619c603f0d0418d8bfbfd64 (patch) | |
tree | 06d8af9795c31aa7a80ab8025ecf891d4e4284c0 | |
parent | 1ebc2b83084f11cddb81150963187fa5d1036241 (diff) | |
download | 0xFFFF-8084f68b5063eaf2a619c603f0d0418d8bfbfd64.tar.bz2 |
local: Fix device detection
-rw-r--r-- | src/local.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/local.c b/src/local.c index 04503eb..091d71a 100644 --- a/src/local.c +++ b/src/local.c @@ -75,28 +75,18 @@ int local_init(void) { --ptr2; } - if ( strcmp(ptr, "Nokia 770") == 0 ) { + if ( strcmp(ptr, "Nokia 770") == 0 ) device = DEVICE_SU_18; - printf("Found local device: %s\n", device_to_long_string(device)); - fclose(file); - return 0; - } else if ( strcmp(ptr, "Nokia N800") == 0 ) { + else if ( strcmp(ptr, "Nokia N800") == 0 ) device = DEVICE_RX_34; - printf("Found local device: %s\n", device_to_long_string(device)); - fclose(file); - return 0; - } else if ( strcmp(ptr, "Nokia N810") == 0 ) { + else if ( strcmp(ptr, "Nokia N810") == 0 ) device = DEVICE_RX_44; - printf("Found local device: %s\n", device_to_long_string(device)); - fclose(file); - return 0; - } else if ( strcmp(ptr, "Nokia N810 WiMAX") == 0 ) { + else if ( strcmp(ptr, "Nokia N810 WiMAX") == 0 ) device = DEVICE_RX_48; - printf("Found local device: %s\n", device_to_long_string(device)); - fclose(file); - return 0; - } else if ( strcmp(ptr, "Nokia RX-51 board") == 0) { + else if ( strcmp(ptr, "Nokia RX-51 board") == 0 ) device = DEVICE_RX_51; + + if ( device ) { printf("Found local device: %s\n", device_to_long_string(device)); fclose(file); return 0; |