• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修订版01c76f540054b3f5849da1d557fd2c477b876356 (tree)
时间2012-01-13 06:24:19
作者Benoit Goby <benoit@andr...>
CommiterBenoit Goby

Log Message

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

更改概述

差异

--- a/init/init.c
+++ b/init/init.c
@@ -65,6 +65,7 @@ static char baseband[32];
6565 static char carrier[32];
6666 static char bootloader[32];
6767 static char hardware[32];
68+static char modelno[32];
6869 static unsigned revision = 0;
6970 static char qemu[32];
7071
@@ -447,6 +448,8 @@ static void import_kernel_nv(char *name, int in_qemu)
447448 strlcpy(bootloader, value, sizeof(bootloader));
448449 } else if (!strcmp(name,"androidboot.hardware")) {
449450 strlcpy(hardware, value, sizeof(hardware));
451+ } else if (!strcmp(name,"androidboot.modelno")) {
452+ strlcpy(modelno, value, sizeof(modelno));
450453 }
451454 } else {
452455 /* in the emulator, export any kernel option with the
@@ -596,6 +599,9 @@ static int set_init_properties_action(int nargs, char **args)
596599 property_set("ro.carrier", carrier[0] ? carrier : "unknown");
597600 property_set("ro.bootloader", bootloader[0] ? bootloader : "unknown");
598601
602+ if (modelno[0])
603+ property_set("ro.boot.modelno", modelno);
604+
599605 property_set("ro.hardware", hardware);
600606 snprintf(tmp, PROP_VALUE_MAX, "%d", revision);
601607 property_set("ro.revision", tmp);