diff options
| author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-28 09:55:31 -0700 |
|---|---|---|
| committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-28 11:44:30 -0700 |
| commit | 2b99543cef1b8b0aa8cca39544939910035117b0 (patch) | |
| tree | e198d8906e61539b808beb2ad23d66c88fe482bb /init/ueventd.c | |
| parent | a5bfd4e3835b44296896da933ca9484441148ae3 (diff) | |
| download | system_core-2b99543cef1b8b0aa8cca39544939910035117b0.tar.gz system_core-2b99543cef1b8b0aa8cca39544939910035117b0.tar.bz2 system_core-2b99543cef1b8b0aa8cca39544939910035117b0.zip | |
Pick up on androidboot.hardware kernel cmd option
x86 emulator passes hardware name through the androidboot.hardware kernel cmd option, and
ueventd must pick up on it to locate proper ueventd.rc file for that hardware.
Change-Id: Id61c5b67fe6275a15c7aa62556e0b89eda7968f8
Diffstat (limited to 'init/ueventd.c')
| -rw-r--r-- | init/ueventd.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/init/ueventd.c b/init/ueventd.c index ddf42be2..ecf3b9be 100644 --- a/init/ueventd.c +++ b/init/ueventd.c @@ -33,6 +33,20 @@ static char hardware[32]; static unsigned revision = 0; +static void import_kernel_nv(char *name, int in_qemu) +{ + if (*name != '\0') { + char *value = strchr(name, '='); + if (value != NULL) { + *value++ = 0; + if (!strcmp(name,"androidboot.hardware")) + { + strlcpy(hardware, value, sizeof(hardware)); + } + } + } +} + int ueventd_main(int argc, char **argv) { struct pollfd ufd; @@ -51,6 +65,11 @@ int ueventd_main(int argc, char **argv) INFO("starting ueventd\n"); + /* Respect hardware passed in through the kernel cmd line. Here we will look + * for androidboot.hardware param in kernel cmdline, and save its value in + * hardware[]. */ + import_kernel_cmdline(0, import_kernel_nv); + get_hardware_name(hardware, &revision); ueventd_parse_config_file("/ueventd.rc"); |
