X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibsystemd-terminal%2Fsubterm.c;h=f2651b24ac3759a148a3d623ad7bc3b1b8c56f0d;hp=920b661af4c95e1ec372ac59f998af0c078412cb;hb=56f64d95763a799ba4475daf44d8e9f72a1bd474;hpb=895b3a7b44fe7ca2f260986be2a877ff56a72718 diff --git a/src/libsystemd-terminal/subterm.c b/src/libsystemd-terminal/subterm.c index 920b661af..f2651b24a 100644 --- a/src/libsystemd-terminal/subterm.c +++ b/src/libsystemd-terminal/subterm.c @@ -103,7 +103,7 @@ static int output_winch(Output *o) { r = ioctl(o->fd, TIOCGWINSZ, &wsz); if (r < 0) { - log_error("error: cannot read window-size: %m"); + log_error_errno(errno, "error: cannot read window-size: %m"); return -errno; } @@ -707,7 +707,7 @@ static int terminal_io_fn(sd_event_source *source, int fd, uint32_t revents, voi if (errno == EAGAIN || errno == EINTR) return 0; - log_error("error: cannot read from TTY (%d): %m", -errno); + log_error_errno(errno, "error: cannot read from TTY (%d): %m", -errno); return -errno; } @@ -823,13 +823,13 @@ static int terminal_new(Terminal **out, int in_fd, int out_fd) { r = tcgetattr(in_fd, &in_attr); if (r < 0) { - log_error("error: tcgetattr() (%d): %m", -errno); + log_error_errno(errno, "error: tcgetattr() (%d): %m", -errno); return -errno; } r = tcgetattr(out_fd, &out_attr); if (r < 0) { - log_error("error: tcgetattr() (%d): %m", -errno); + log_error_errno(errno, "error: tcgetattr() (%d): %m", -errno); return -errno; } @@ -955,7 +955,7 @@ static int terminal_run(Terminal *t) { setenv("COLORTERM", "systemd-subterm", 1); execve(argv[0], argv, environ); - log_error("error: cannot exec %s (%d): %m", argv[0], -errno); + log_error_errno(errno, "error: cannot exec %s (%d): %m", argv[0], -errno); _exit(1); }