summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2017-08-04 15:35:51 -0500
committerMark Salyzyn2017-09-12 11:28:25 -0500
commitb304f6d4e7752e08519a96aeaa936e36492afdc9 (patch)
tree7896fbfe0ec2eea5fb7dd587e2e9657acc97b5f0 /libcutils/fs_config.cpp
parent2dac833ea81fae56c01803e9c7cdd1dd81555622 (diff)
downloadplatform-system-core-b304f6d4e7752e08519a96aeaa936e36492afdc9.tar.gz
platform-system-core-b304f6d4e7752e08519a96aeaa936e36492afdc9.tar.xz
platform-system-core-b304f6d4e7752e08519a96aeaa936e36492afdc9.zip
bootstat: introduce sys.boot.reason
Adding functionality to bootstat --record_boot_complete and --record_boot_reason to initialize sys.boot.reason, the canonical system boot reason. Filter out ro.boot.bootreason oem noise into sys.boot.reason. Add heuristics to determine what the boot reason is, when otherwise would be defaulting to the blunt and relatively devoid of detail catch-all reboot reasons ("reboot", "shutdown", "cold", "warm", "hard"). boot_reason_test.sh is also a compliance test. Test: boot_reason_test.sh all Bug: 63736262 Change-Id: Ic9a42cccbcfc89a5c0e081ba66d577a97c8c8c76
Diffstat (limited to 'libcutils/fs_config.cpp')
-rw-r--r--libcutils/fs_config.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index a1dbd7881..118504051 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -175,6 +175,8 @@ static const struct fs_path_config android_files[] = {
175 CAP_MASK_LONG(CAP_AUDIT_CONTROL) | 175 CAP_MASK_LONG(CAP_AUDIT_CONTROL) |
176 CAP_MASK_LONG(CAP_SETGID), 176 CAP_MASK_LONG(CAP_SETGID),
177 "system/bin/logd" }, 177 "system/bin/logd" },
178 { 00550, AID_SYSTEM, AID_LOG, CAP_MASK_LONG(CAP_SYSLOG),
179 "system/bin/bootstat" },
178 { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | 180 { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) |
179 CAP_MASK_LONG(CAP_SETGID), 181 CAP_MASK_LONG(CAP_SETGID),
180 "system/bin/run-as" }, 182 "system/bin/run-as" },