am 9f4d558e
: Merge "ueventd: easier debug logging"
* commit '9f4d558e0c80602aa8707ec9d0bdd33a93aa4f16': ueventd: easier debug logging
This commit is contained in:
commit
f2d0986320
3 changed files with 11 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue