summaryrefslogtreecommitdiff
path: root/testing/util-linux/agetty-typo.patch
blob: a333d6280067d3e863bae162ca55862e670d6451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 89aed1c950376d828e1e0ddef94909a028e0517d Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 7 Sep 2011 07:37:03 +0200
Subject: [PATCH] agetty: double equals sign typo in opentty()

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
---
 term-utils/agetty.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 733be38..35bb389 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -985,7 +985,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 	 * In case of a virtual console the ioctl TIOCMGET fails and
 	 * the error number will be set to EINVAL.
 	 */
-	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno = EINVAL)) {
+	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno == EINVAL)) {
 		op->flags |= F_VCONSOLE;
 		if (!op->term)
 			op->term = DEFAULT_VCTERM;
-- 
1.7.6.1