am 4ad20e55: Merge "Redirect libselinux logging to dmesg for ueventd."

* commit '4ad20e55e5a5d2acbecd564523f47056d3156638':
  Redirect libselinux logging to dmesg for ueventd.
diff --git a/init/init.c b/init/init.c
index 97c33e4..f001071 100644
--- a/init/init.c
+++ b/init/init.c
@@ -938,7 +938,7 @@
     return 0;
 }
 
-static int log_callback(int type, const char *fmt, ...)
+int log_callback(int type, const char *fmt, ...)
 {
     int level;
     va_list ap;
diff --git a/init/log.h b/init/log.h
index 0ba770f..e9cb65a 100644
--- a/init/log.h
+++ b/init/log.h
@@ -23,4 +23,6 @@
 #define NOTICE(x...)  KLOG_NOTICE("init", x)
 #define INFO(x...)    KLOG_INFO("init", x)
 
+extern int log_callback(int type, const char *fmt, ...);
+
 #endif
diff --git a/init/ueventd.c b/init/ueventd.c
index 4ad0cb9..833e4fd 100644
--- a/init/ueventd.c
+++ b/init/ueventd.c
@@ -21,6 +21,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <signal.h>
+#include <selinux/selinux.h>
 
 #include <private/android_filesystem_config.h>
 
@@ -76,6 +77,10 @@
     }
 #endif
 
+    union selinux_callback cb;
+    cb.func_log = log_callback;
+    selinux_set_callback(SELINUX_CB_LOG, cb);
+
     INFO("starting ueventd\n");
 
     /* Respect hardware passed in through the kernel cmd line. Here we will look