]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: double equals sign typo in opentty()
authorKarel Zak <kzak@redhat.com>
Wed, 7 Sep 2011 05:37:03 +0000 (07:37 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Sep 2011 05:37:03 +0000 (07:37 +0200)
Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/agetty.c

index 733be3802bcb41a7cf41ea9ffbf8b5760aa77404..35bb3895455756adc0a9fbdce97f53c87b485adb 100644 (file)
@@ -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;