diff options
author | Rom Lemarchand <romlem@android.com> | 2015-02-27 17:20:29 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-03-14 11:05:48 -0700 |
commit | 74b34f3cb79aa8f2c5ba6a9dcc46d0dd84cdac86 (patch) | |
tree | 938a00b0ccfce17fafed89fd8ee4b1f216d78fba /init/ueventd.cpp | |
parent | f1c2ba490ef979b3d347f08535ab8b817e917e62 (diff) | |
download | system_core-74b34f3cb79aa8f2c5ba6a9dcc46d0dd84cdac86.zip system_core-74b34f3cb79aa8f2c5ba6a9dcc46d0dd84cdac86.tar.gz system_core-74b34f3cb79aa8f2c5ba6a9dcc46d0dd84cdac86.tar.bz2 |
Remove /proc/cpuinfo parsing
- Clean up the paths for ro.revision and ro.hardware parsing
- Use ro.hardwre in ueventd instead of parsing the kernel command line
(cherry-pick of 38b340a52f8e864650db8bae1eb88d5c00485db0.)
Bug: 19366018
Change-Id: I018a293f3d46e736a8b65132b5b00b0f7c20edae
Diffstat (limited to 'init/ueventd.cpp')
-rw-r--r-- | init/ueventd.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/init/ueventd.cpp b/init/ueventd.cpp index d56b91a..5af6e3d 100644 --- a/init/ueventd.cpp +++ b/init/ueventd.cpp @@ -30,28 +30,13 @@ #include "util.h" #include "devices.h" #include "ueventd_parser.h" - -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)); - } - } - } -} +#include "property_service.h" int ueventd_main(int argc, char **argv) { struct pollfd ufd; int nr; + char hardware[PROP_VALUE_MAX]; char tmp[32]; /* @@ -83,12 +68,7 @@ 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); + property_get("ro.hardware", hardware); ueventd_parse_config_file("/ueventd.rc"); |