| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "crash-reporter/kernel_collector.h" | 5 #include "crash-reporter/kernel_collector.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "crash-reporter/system_logging.h" | 10 #include "crash-reporter/system_logging.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 kernel_dump.length()) != | 97 kernel_dump.length()) != |
| 98 static_cast<int>(kernel_dump.length())) { | 98 static_cast<int>(kernel_dump.length())) { |
| 99 logger_->LogInfo("Failed to write kernel dump to %s", | 99 logger_->LogInfo("Failed to write kernel dump to %s", |
| 100 kernel_crash_path.value().c_str()); | 100 kernel_crash_path.value().c_str()); |
| 101 return true; | 101 return true; |
| 102 } | 102 } |
| 103 | 103 |
| 104 WriteCrashMetaData( | 104 WriteCrashMetaData( |
| 105 root_crash_directory.Append( | 105 root_crash_directory.Append( |
| 106 StringPrintf("%s.meta", dump_basename.c_str())), | 106 StringPrintf("%s.meta", dump_basename.c_str())), |
| 107 kKernelExecName); | 107 kKernelExecName, |
| 108 kernel_crash_path.value()); |
| 108 | 109 |
| 109 logger_->LogInfo("Collected kernel crash diagnostics into %s", | 110 logger_->LogInfo("Collected kernel crash diagnostics into %s", |
| 110 kernel_crash_path.value().c_str()); | 111 kernel_crash_path.value().c_str()); |
| 111 } else { | 112 } else { |
| 112 logger_->LogInfo("Crash not saved since metrics disabled"); | 113 logger_->LogInfo("Crash not saved since metrics disabled"); |
| 113 } | 114 } |
| 114 if (!ClearPreservedDump()) { | 115 if (!ClearPreservedDump()) { |
| 115 return false; | 116 return false; |
| 116 } | 117 } |
| 117 | 118 |
| 118 return true; | 119 return true; |
| 119 } | 120 } |
| OLD | NEW |