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

Commit 6a12797c authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge \\"dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG\\" am: 00e3f299

am: db290501

Change-Id: Ib628ab8c43db208fa891d1e19f483a1f6bea21e0
parents 2bee6c56 db290501
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ static int control_socket_fd;
static std::string suffix;

#define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops"
#define ALT_PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops-0"

#define RAFT_DIR "/data/misc/raft/"
#define RECOVERY_DIR "/cache/recovery"
@@ -781,6 +782,8 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver
    if (!stat(PSTORE_LAST_KMSG, &st)) {
        /* Also TODO: Make console-ramoops CAP_SYSLOG protected. */
        dump_file("LAST KMSG", PSTORE_LAST_KMSG);
    } else if (!stat(ALT_PSTORE_LAST_KMSG, &st)) {
        dump_file("LAST KMSG", ALT_PSTORE_LAST_KMSG);
    } else {
        /* TODO: Make last_kmsg CAP_SYSLOG protected. b/5555691 */
        dump_file("LAST KMSG", "/proc/last_kmsg");