diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-03-02 01:56:23 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@chromium.org> | 2019-03-04 16:45:16 +0000 |
commit | 7864f2edaad675f21d87e1f62e5b3e259afae995 (patch) | |
tree | 1dfdb55a69d36df84133e587ed9b8e6705bda7e9 /src/tools/linux | |
parent | linux_core_dumper: support NT_SIGINFO for reading crashing address (diff) | |
download | breakpad-7864f2edaad675f21d87e1f62e5b3e259afae995.tar.xz |
core2md: write error message with perror
The current failure message omits the underlying errno. This can
make diagnosing failures a bit difficult unless you run everything
through strace. For example:
$ core2md core /proc/self md
$ core2md core /proc/self md
Unable to generate minidump
Now we get the errno details:
Unable to generate minidump: File exists
Change-Id: I67f30879868ce4a726d5d888ee8c0a4a316b5186
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1497660
Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
Diffstat (limited to 'src/tools/linux')
-rw-r--r-- | src/tools/linux/core2md/core2md.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/linux/core2md/core2md.cc b/src/tools/linux/core2md/core2md.cc index a0e8f8ba..c3a9da39 100644 --- a/src/tools/linux/core2md/core2md.cc +++ b/src/tools/linux/core2md/core2md.cc @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) { if (!WriteMinidumpFromCore(minidump_file, core_file, procfs_dir)) { - fprintf(stderr, "Unable to generate minidump.\n"); + perror("core2md: Unable to generate minidump"); return 1; } |