summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-07-08 15:59:25 -0700
committerSteven Moreland <smoreland@google.com>2019-07-08 15:59:25 -0700
commitfe535f5e682f4bada56ece1e4b8b0b11dba3f5d3 (patch)
treeceb609c6e335551279e3ce0a20cdb1ae5ca6cf0d
parent7e473e262dc1cc5ce09d1a1935cc9bc9b43b0e7e (diff)
logcat: add 'kernel' to defaults
I'm asked at least once a week or more why a new service isn't starting. Usually, the reason is that "File ... has incorrect label or no domain transition from ... to another SELinux domain defined. ..." from init. Even in permissive mode, this is required. Bug: 63014404 Test: boot, check logcat Change-Id: I7244a56fc46f84e9592e1eccf2d23461691965b3
-rw-r--r--logcat/logcat.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 15e07feef..6e38d9551 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -483,7 +483,8 @@ static void show_help(android_logcat_context_internal* context) {
" Additionally, 'kernel' for userdebug and eng builds, and\n"
" 'security' for Device Owner installations.\n"
" Multiple -b parameters or comma separated list of buffers are\n"
- " allowed. Buffers interleaved. Default -b main,system,crash.\n"
+ " allowed. Buffers interleaved.\n"
+ " Default -b main,system,crash,kernel.\n"
" -B, --binary Output the log in binary.\n"
" -S, --statistics Output statistics.\n"
" -p, --prune Print prune white and ~black list. Service is specified as\n"
@@ -1312,6 +1313,10 @@ static int __logcat(android_logcat_context_internal* context) {
dev = dev->next = new log_device_t("crash", false);
context->devCount++;
}
+ if (android_name_to_log_id("kernel") == LOG_ID_KERNEL) {
+ dev = dev->next = new log_device_t("kernel", false);
+ context->devCount++;
+ }
}
if (!!context->logRotateSizeKBytes && !context->outputFileName) {