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

Commit 2bedc745 authored by Steve Fung's avatar Steve Fung
Browse files

crash_reporter: Fix paths for kernel panic collection

Fix the paths to the pstore mount and run data within
the kernel collector.

BUG=26774830

Change-Id: I68be0a28201cb73c3420166b2f4da77a1e586ca2
parent 650f6809
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@
#endif

static const char kCrashCounterHistogram[] = "Logging.CrashCounter";
static const char kKernelCrashDetected[] = "/var/run/kernel-crash-detected";
static const char kKernelCrashDetected[] =
    "/data/misc/crash_reporter/run/kernel-crash-detected";
static const char kUncleanShutdownDetected[] =
    "/var/run/unclean-shutdown-detected";
static const char kGUIDFileName[] = "/data/misc/crash_reporter/guid";
+4 −0
Original line number Diff line number Diff line
@@ -13,6 +13,10 @@ on post-fs-data
    # Remove any previous orphaned locks.
    rmdir /data/misc/crash_reporter/lock/crash_sender

    # Remove any previous run files.
    rm /data/misc/crash_reporter/run/kernel-crash-detected
    rmdir /data/misc/crash_reporter/run

    # Create crash directories.
    # These directories are group-writable by root so that crash_reporter can
    # still access them when it switches users.
+2 −2
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ using base::StringPrintf;
namespace {

const char kDefaultKernelStackSignature[] = "kernel-UnspecifiedStackSignature";
const char kDumpParentPath[] = "/dev";
const char kDumpPath[] = "/dev/pstore";
const char kDumpParentPath[] = "/sys/fs";
const char kDumpPath[] = "/sys/fs/pstore";
const char kDumpFormat[] = "dmesg-ramoops-%zu";
const char kKernelExecName[] = "kernel";
// Maximum number of records to examine in the kDumpPath.
+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ const int kSecondsPerWeek = kSecondsPerDay * kDaysPerWeek;
// Interval between calls to UpdateStats().
const uint32_t kUpdateStatsIntervalMs = 300000;

const char kKernelCrashDetectedFile[] = "/var/run/kernel-crash-detected";
const char kKernelCrashDetectedFile[] =
    "/data/misc/crash_reporter/run/kernel-crash-detected";
const char kUncleanShutdownDetectedFile[] =
    "/var/run/unclean-shutdown-detected";