diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 17:09:20 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 17:17:51 +0100 |
commit | c33b329709ebe2755181980a050d02ec7c81ed87 (patch) | |
tree | 39080c428c72c90daddbe1c08d45c181adf1476c /src/libsystemd-terminal/grdev.c | |
parent | 5567fafbc9d83a1391f23ecdbe698a3c03929370 (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/libsystemd-terminal/grdev.c')
-rw-r--r-- | src/libsystemd-terminal/grdev.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libsystemd-terminal/grdev.c b/src/libsystemd-terminal/grdev.c index 0c21eac551..db87ede762 100644 --- a/src/libsystemd-terminal/grdev.c +++ b/src/libsystemd-terminal/grdev.c @@ -577,8 +577,8 @@ static bool display_cache(grdev_display *display) { out: if (r < 0) - log_debug("grdev: %s/%s: cannot cache pipes: %s", - display->session->name, display->name, strerror(-r)); + log_debug_errno(r, "grdev: %s/%s: cannot cache pipes: %m", + display->session->name, display->name); return true; } @@ -772,8 +772,8 @@ void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames) { return; error: - log_debug("grdev: %s/%s/%s: cannot schedule vsync timer: %s", - pipe->card->session->name, pipe->card->name, pipe->name, strerror(-r)); + log_debug_errno(r, "grdev: %s/%s/%s: cannot schedule vsync timer: %m", + pipe->card->session->name, pipe->card->name, pipe->name); } /* @@ -1176,8 +1176,8 @@ void grdev_session_add_drm(grdev_session *session, struct udev_device *ud) { r = grdev_drm_card_new(&card, session, ud); if (r < 0) { - log_debug("grdev: %s: cannot add DRM device for %s: %s", - session->name, udev_device_get_syspath(ud), strerror(-r)); + log_debug_errno(r, "grdev: %s: cannot add DRM device for %s: %m", + session->name, udev_device_get_syspath(ud)); return; } @@ -1269,8 +1269,8 @@ static void session_configure(grdev_session *session) { } else if (!display) { r = grdev_display_new(&display, session, pipe->name); if (r < 0) { - log_debug("grdev: %s/%s: cannot create display for pipe %s: %s", - session->name, card->name, pipe->name, strerror(-r)); + log_debug_errno(r, "grdev: %s/%s: cannot create display for pipe %s: %m", + session->name, card->name, pipe->name); continue; } } |