am db3278ab: Merge "Map SELinux log levels to Android log levels."
* commit 'db3278ab429860161e5baa26f141de95a48de0cb': Map SELinux log levels to Android log levels.
This commit is contained in:
@@ -443,8 +443,21 @@ static JNINativeMethod method_table[] = {
|
||||
|
||||
static int log_callback(int type, const char *fmt, ...) {
|
||||
va_list ap;
|
||||
int priority;
|
||||
|
||||
switch (type) {
|
||||
case SELINUX_WARNING:
|
||||
priority = ANDROID_LOG_WARN;
|
||||
break;
|
||||
case SELINUX_INFO:
|
||||
priority = ANDROID_LOG_INFO;
|
||||
break;
|
||||
default:
|
||||
priority = ANDROID_LOG_ERROR;
|
||||
break;
|
||||
}
|
||||
va_start(ap, fmt);
|
||||
LOG_PRI_VA(ANDROID_LOG_ERROR, "SELinux", fmt, ap);
|
||||
LOG_PRI_VA(priority, "SELinux", fmt, ap);
|
||||
va_end(ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user