summaryrefslogtreecommitdiff
path: root/src/console/consoled-terminal.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:19:16 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:29:21 +0100
commitda927ba997d68401563b927f92e6e40e021a8e5c (patch)
tree71764cd998aef07b8943c5206c9307a93ba9c528 /src/console/consoled-terminal.c
parent0a1beeb64207eaa88ab9236787b1cbc2f704ae14 (diff)
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
Diffstat (limited to 'src/console/consoled-terminal.c')
-rw-r--r--src/console/consoled-terminal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/console/consoled-terminal.c b/src/console/consoled-terminal.c
index 7d0f646c7e..166a43b5b1 100644
--- a/src/console/consoled-terminal.c
+++ b/src/console/consoled-terminal.c
@@ -52,7 +52,7 @@ static int terminal_pty_fn(Pty *pty, void *userdata, unsigned int event, const v
case PTY_DATA:
r = term_screen_feed_text(t->screen, ptr, size);
if (r < 0)
- log_error_errno(-r, "Cannot update screen state: %m");
+ log_error_errno(r, "Cannot update screen state: %m");
workspace_dirty(t->workspace);
break;
@@ -128,12 +128,12 @@ void terminal_resize(Terminal *t) {
if (t->pty) {
r = pty_resize(t->pty, width, height);
if (r < 0)
- log_error_errno(-r, "Cannot resize pty: %m");
+ log_error_errno(r, "Cannot resize pty: %m");
}
r = term_screen_resize(t->screen, width, height);
if (r < 0)
- log_error_errno(-r, "Cannot resize screen: %m");
+ log_error_errno(r, "Cannot resize screen: %m");
}
void terminal_run(Terminal *t) {
@@ -151,7 +151,7 @@ void terminal_run(Terminal *t) {
term_screen_get_width(t->screen),
term_screen_get_height(t->screen));
if (pid < 0) {
- log_error_errno(-pid, "Cannot fork PTY: %m");
+ log_error_errno(pid, "Cannot fork PTY: %m");
return;
} else if (pid == 0) {
/* child */