summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2014-03-08 02:00:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-08 02:00:29 +0000
commit27514f6de9d2ad039a187e5584f296ec05a4ef18 (patch)
tree41c902ce37bceccc8db8b1962b3be7378349887b /init
parentdb480f7516977123a0c5c6f6705b282d2e55ab89 (diff)
parentf2d09863204fc04c7f030ce7adf51deb5de952ce (diff)
downloadsystem_core-27514f6de9d2ad039a187e5584f296ec05a4ef18.zip
system_core-27514f6de9d2ad039a187e5584f296ec05a4ef18.tar.gz
system_core-27514f6de9d2ad039a187e5584f296ec05a4ef18.tar.bz2
am f2d09863: am 9f4d558e: Merge "ueventd: easier debug logging"
* commit 'f2d09863204fc04c7f030ce7adf51deb5de952ce': ueventd: easier debug logging
Diffstat (limited to 'init')
-rw-r--r--init/Android.mk5
-rw-r--r--init/log.h2
-rw-r--r--init/ueventd.c6
3 files changed, 11 insertions, 2 deletions
diff --git a/init/Android.mk b/init/Android.mk
index 1f43ba6..740d10f 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -26,6 +26,9 @@ ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1
endif
+# Enable ueventd logging
+#LOCAL_CFLAGS += -DLOG_UEVENTS=1
+
LOCAL_MODULE:= init
LOCAL_FORCE_STATIC_EXECUTABLE := true
@@ -42,6 +45,8 @@ LOCAL_STATIC_LIBRARIES := \
libmincrypt \
libext4_utils_static
+LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
+
include $(BUILD_EXECUTABLE)
# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
diff --git a/init/log.h b/init/log.h
index 4aac3df..0ba770f 100644
--- a/init/log.h
+++ b/init/log.h
@@ -23,6 +23,4 @@
#define NOTICE(x...) KLOG_NOTICE("init", x)
#define INFO(x...) KLOG_INFO("init", x)
-#define LOG_UEVENTS 0 /* log uevent messages if 1. verbose */
-
#endif
diff --git a/init/ueventd.c b/init/ueventd.c
index 3d01836..5517448 100644
--- a/init/ueventd.c
+++ b/init/ueventd.c
@@ -69,6 +69,12 @@ int ueventd_main(int argc, char **argv)
open_devnull_stdio();
klog_init();
+#if LOG_UEVENTS
+ /* Ensure we're at a logging level that will show the events */
+ if (klog_get_level() < KLOG_LEVEL_INFO) {
+ klog_set_level(KLOG_LEVEL_INFO);
+ }
+#endif
INFO("starting ueventd\n");