ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
b677e7
From 7662d7c86d1fbb01693d4eb008fa27bf1e0030a9 Mon Sep 17 00:00:00 2001
b677e7
From: Lennart Poettering <lennart@poettering.net>
b677e7
Date: Mon, 6 Aug 2018 18:21:37 +0200
b677e7
Subject: [PATCH] logind: fix bad error propagation
b677e7
b677e7
(cherry picked from commit cce08496e7353e3e9903b42695aba3f9d259b90a)
b677e7
b677e7
Related: #1642460
b677e7
---
b677e7
 src/login/logind-seat.c | 2 +-
b677e7
 1 file changed, 1 insertion(+), 1 deletion(-)
b677e7
b677e7
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
b677e7
index f68fc0ceaa..9e4f009643 100644
b677e7
--- a/src/login/logind-seat.c
b677e7
+++ b/src/login/logind-seat.c
b677e7
@@ -175,7 +175,7 @@ static int vt_allocate(unsigned int vtnr) {
b677e7
         xsprintf(p, "/dev/tty%u", vtnr);
b677e7
         fd = open_terminal(p, O_RDWR|O_NOCTTY|O_CLOEXEC);
b677e7
         if (fd < 0)
b677e7
-                return -errno;
b677e7
+                return fd;
b677e7
 
b677e7
         return 0;
b677e7
 }