summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-06 18:35:46 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-06 19:06:03 -0400
commit31cda3d1759dee3e48c8ed4a949d99f041bdca1c (patch)
tree3a278f069215aed203571fffa8b48df7b9881508 /src/journal
parentfd53fee04b1f1c1ca1e30e8d470d7416900a35dc (diff)
coredumpctl: show a useful error on permission problems
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredumpctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 5d6b2c7adf..d1450c09a2 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -595,7 +595,8 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
retrieve(data, len, "COREDUMP_FILENAME", &filename);
if (filename && access(filename, R_OK) < 0) {
- log_debug("File %s is not readable: %m", filename);
+ log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
+ "File %s is not readable: %m", filename);
free(filename);
filename = NULL;
}
@@ -668,7 +669,7 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
#endif
} else {
if (r == -ENOENT)
- log_error("Coredump neither in journal file nor stored externally on disk.");
+ log_error("Cannot retrieve coredump from journal nor disk.");
else
log_error("Failed to retrieve COREDUMP field: %s", strerror(-r));
goto error;