Merge "Redirect libselinux logging to dmesg for ueventd."
This commit is contained in:
commit
4ad20e55e5
3 changed files with 8 additions and 1 deletions
|
|
@ -938,7 +938,7 @@ static int audit_callback(void *data, security_class_t cls __attribute__((unused
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int log_callback(int type, const char *fmt, ...)
|
int log_callback(int type, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
int level;
|
int level;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,6 @@
|
||||||
#define NOTICE(x...) KLOG_NOTICE("init", x)
|
#define NOTICE(x...) KLOG_NOTICE("init", x)
|
||||||
#define INFO(x...) KLOG_INFO("init", x)
|
#define INFO(x...) KLOG_INFO("init", x)
|
||||||
|
|
||||||
|
extern int log_callback(int type, const char *fmt, ...);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <selinux/selinux.h>
|
||||||
|
|
||||||
#include <private/android_filesystem_config.h>
|
#include <private/android_filesystem_config.h>
|
||||||
|
|
||||||
|
|
@ -76,6 +77,10 @@ int ueventd_main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
union selinux_callback cb;
|
||||||
|
cb.func_log = log_callback;
|
||||||
|
selinux_set_callback(SELINUX_CB_LOG, cb);
|
||||||
|
|
||||||
INFO("starting ueventd\n");
|
INFO("starting ueventd\n");
|
||||||
|
|
||||||
/* Respect hardware passed in through the kernel cmd line. Here we will look
|
/* Respect hardware passed in through the kernel cmd line. Here we will look
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue