X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd-terminal%2Fevcat.c;h=d274225ed04a5d8e275e322ada888a01b057f397;hb=b6e676ce41508e2aeea22202fc8f234126177f52;hp=b77f4b0f51bfc475a59104b5f44454da7cdc36f7;hpb=23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41;p=elogind.git diff --git a/src/libsystemd-terminal/evcat.c b/src/libsystemd-terminal/evcat.c index b77f4b0f5..d274225ed 100644 --- a/src/libsystemd-terminal/evcat.c +++ b/src/libsystemd-terminal/evcat.c @@ -26,17 +26,13 @@ * problems. */ -#include #include #include #include #include -#include -#include #include #include #include -#include #include #include #include @@ -46,7 +42,6 @@ #include #include #include "build.h" -#include "bus-util.h" #include "event-util.h" #include "idev.h" #include "macro.h" @@ -358,16 +353,12 @@ static int evcat_sysview_fn(sysview_context *c, void *userdata, sysview_event *e return log_error_errno(r, "Cannot acquire session control: %m"); r = ioctl(1, KDSKBMODE, K_UNICODE); - if (r < 0) { - log_error("Cannot set K_UNICODE on stdout: %m"); - return -errno; - } + if (r < 0) + return log_error_errno(errno, "Cannot set K_UNICODE on stdout: %m"); r = ioctl(1, KDSETMODE, KD_TEXT); - if (r < 0) { - log_error("Cannot set KD_TEXT on stdout: %m"); - return -errno; - } + if (r < 0) + return log_error_errno(errno, "Cannot set KD_TEXT on stdout: %m"); printf("\n");