]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: check ioctl() return value [coverity: CID 503786]
authorKarel Zak <kzak@redhat.com>
Mon, 13 Jul 2026 10:09:34 +0000 (12:09 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 13 Jul 2026 10:09:34 +0000 (12:09 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
agetty-cmd/tty.c

index 38a963658921bc163614b949d37a0eb924e10245..b75fef733e046986b48219e3adb9c35945ac5b2d 100644 (file)
@@ -387,7 +387,8 @@ void agetty_termio_init(struct agetty_options *op, struct termios *tp)
                sleep(1);
        }
        memset(&lock, 0, sizeof(struct termios));
-       ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock);
+       if (ioctl(STDIN_FILENO, TIOCSLCKTRMIOS, &lock))
+               debug("unlock termios failed\n");
 #endif
 
        if (op->flags & F_VCONSOLE) {