Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 643be3ba authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am 3dfa15c4: am db3278ab: Merge "Map SELinux log levels to Android log levels."

* commit '3dfa15c4':
  Map SELinux log levels to Android log levels.
parents 53959634 3dfa15c4
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -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;
}