summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorKarel Zak2011-09-07 07:37:03 +0200
committerKarel Zak2011-09-07 07:37:03 +0200
commit89aed1c950376d828e1e0ddef94909a028e0517d (patch)
tree4d69bb616c399684ce44116e1f74b0638e9d57fb /term-utils/agetty.c
parentscript: fix building with --disable-nls (diff)
downloadkernel-qcow2-util-linux-89aed1c950376d828e1e0ddef94909a028e0517d.tar.gz
kernel-qcow2-util-linux-89aed1c950376d828e1e0ddef94909a028e0517d.tar.xz
kernel-qcow2-util-linux-89aed1c950376d828e1e0ddef94909a028e0517d.zip
agetty: double equals sign typo in opentty()
Reported-by: Francesco Cosoleto <cosoleto@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 733be3802..35bb38954 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;