chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
importd: add new bus calls for importing local tar and raw images
[elogind.git]
/
src
/
libsystemd-terminal
/
evcat.c
diff --git
a/src/libsystemd-terminal/evcat.c
b/src/libsystemd-terminal/evcat.c
index afb61c71a4e254d690e0ae28c97db2adfdc212ef..d274225ed04a5d8e275e322ada888a01b057f397 100644
(file)
--- a/
src/libsystemd-terminal/evcat.c
+++ b/
src/libsystemd-terminal/evcat.c
@@
-26,17
+26,13
@@
* problems.
*/
* problems.
*/
-#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <libevdev/libevdev.h>
#include <linux/kd.h>
#include <errno.h>
#include <getopt.h>
#include <libevdev/libevdev.h>
#include <linux/kd.h>
-#include <linux/vt.h>
-#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <systemd/sd-bus.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <systemd/sd-bus.h>
@@
-46,7
+42,6
@@
#include <unistd.h>
#include <xkbcommon/xkbcommon.h>
#include "build.h"
#include <unistd.h>
#include <xkbcommon/xkbcommon.h>
#include "build.h"
-#include "bus-util.h"
#include "event-util.h"
#include "idev.h"
#include "macro.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);
return log_error_errno(r, "Cannot acquire session control: %m");
r = ioctl(1, KDSKBMODE, K_UNICODE);
- if (r < 0) {
- log_error_errno(errno, "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);
r = ioctl(1, KDSETMODE, KD_TEXT);
- if (r < 0) {
- log_error_errno(errno, "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");
printf("\n");