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
This commit is contained in:
Steve Fung 2016-02-02 16:11:43 -08:00
parent 650f6809a3
commit 2bedc74553
4 changed files with 10 additions and 4 deletions

View File

@ -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";

View File

@ -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.

View File

@ -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.

View File

@ -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";