summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Goby2012-01-12 14:57:30 -0600
committerBenoit Goby2012-01-12 15:24:19 -0600
commit01c76f540054b3f5849da1d557fd2c477b876356 (patch)
tree53f5559ac8ee3f889763d10a55dd3fb9c962c66b
parent7cd3e0a3a2f9b104cd6c04f699ae62c4577787e2 (diff)
downloadplatform-system-core-01c76f540054b3f5849da1d557fd2c477b876356.tar.gz
platform-system-core-01c76f540054b3f5849da1d557fd2c477b876356.tar.xz
platform-system-core-01c76f540054b3f5849da1d557fd2c477b876356.zip
HACK: Export androidboot.modelno as ro.boot.modelno -- DO NOT MERGE
Export androidboot.modelno command line parameter as ro.boot.modelno property, so that we can set the USB iProduct string to the correct value on Stingray. Bug: 5853250 Change-Id: Idc413f15dc4d9d02027589d1b11bdf50e0a79ccc
-rwxr-xr-xinit/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index d10ca478c..165fea0d2 100755
--- a/init/init.c
+++ b/init/init.c
@@ -65,6 +65,7 @@ static char baseband[32];
65static char carrier[32]; 65static char carrier[32];
66static char bootloader[32]; 66static char bootloader[32];
67static char hardware[32]; 67static char hardware[32];
68static char modelno[32];
68static unsigned revision = 0; 69static unsigned revision = 0;
69static char qemu[32]; 70static char qemu[32];
70 71
@@ -447,6 +448,8 @@ static void import_kernel_nv(char *name, int in_qemu)
447 strlcpy(bootloader, value, sizeof(bootloader)); 448 strlcpy(bootloader, value, sizeof(bootloader));
448 } else if (!strcmp(name,"androidboot.hardware")) { 449 } else if (!strcmp(name,"androidboot.hardware")) {
449 strlcpy(hardware, value, sizeof(hardware)); 450 strlcpy(hardware, value, sizeof(hardware));
451 } else if (!strcmp(name,"androidboot.modelno")) {
452 strlcpy(modelno, value, sizeof(modelno));
450 } 453 }
451 } else { 454 } else {
452 /* in the emulator, export any kernel option with the 455 /* in the emulator, export any kernel option with the
@@ -596,6 +599,9 @@ static int set_init_properties_action(int nargs, char **args)
596 property_set("ro.carrier", carrier[0] ? carrier : "unknown"); 599 property_set("ro.carrier", carrier[0] ? carrier : "unknown");
597 property_set("ro.bootloader", bootloader[0] ? bootloader : "unknown"); 600 property_set("ro.bootloader", bootloader[0] ? bootloader : "unknown");
598 601
602 if (modelno[0])
603 property_set("ro.boot.modelno", modelno);
604
599 property_set("ro.hardware", hardware); 605 property_set("ro.hardware", hardware);
600 snprintf(tmp, PROP_VALUE_MAX, "%d", revision); 606 snprintf(tmp, PROP_VALUE_MAX, "%d", revision);
601 property_set("ro.revision", tmp); 607 property_set("ro.revision", tmp);