summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:09:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 17:17:51 +0100
commitc33b329709ebe2755181980a050d02ec7c81ed87 (patch)
tree39080c428c72c90daddbe1c08d45c181adf1476c /src/journal/sd-journal.c
parent5567fafbc9d83a1391f23ecdbe698a3c03929370 (diff)
treewide: more log_*_errno() conversions, multiline calls
Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 61e64f7f7c..d171600eef 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1466,8 +1466,8 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname)
dirent_is_file_with_suffix(de, ".journal~")) {
r = add_file(j, m->path, de->d_name);
if (r < 0) {
- log_debug("Failed to add file %s/%s: %s",
- m->path, de->d_name, strerror(-r));
+ log_debug_errno(r, "Failed to add file %s/%s: %m",
+ m->path, de->d_name);
r = set_put_error(j, r);
if (r < 0)
return r;
@@ -1556,8 +1556,8 @@ static int add_root_directory(sd_journal *j, const char *p) {
dirent_is_file_with_suffix(de, ".journal~")) {
r = add_file(j, m->path, de->d_name);
if (r < 0) {
- log_debug("Failed to add file %s/%s: %s",
- m->path, de->d_name, strerror(-r));
+ log_debug_errno(r, "Failed to add file %s/%s: %m",
+ m->path, de->d_name);
r = set_put_error(j, r);
if (r < 0)
return r;
@@ -2218,8 +2218,8 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) {
if (e->mask & (IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB)) {
r = add_file(j, d->path, e->name);
if (r < 0) {
- log_debug("Failed to add file %s/%s: %s",
- d->path, e->name, strerror(-r));
+ log_debug_errno(r, "Failed to add file %s/%s: %m",
+ d->path, e->name);
set_put_error(j, r);
}