]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Change tcgetattr error handling.
authorSoumendra Ganguly <soumendraganguly@gmail.com>
Sat, 8 Aug 2020 10:28:42 +0000 (05:28 -0500)
committerSoumendra Ganguly <soumendraganguly@gmail.com>
Sat, 8 Aug 2020 10:28:42 +0000 (05:28 -0500)
term-utils/scriptreplay.c

index 182d8d5d727d44e02f869a2e8feda7738abeb295..7b571e2e4f81456ef29e214bc95e6909718183c1 100644 (file)
@@ -128,9 +128,8 @@ setterm(struct termios *backup)
        struct termios tattr;
 
        if (tcgetattr(STDOUT_FILENO, backup) != 0) {
-               if (errno == EBADF)
-                       err(EXIT_FAILURE, _("%d not valid fd"), STDOUT_FILENO);
-               /* errno == ENOTTY */
+               if (errno != ENOTTY) /* For debugger. */
+                       err(EXIT_FAILURE, _("unexpected tcgetattr failure"));
                return 0;
        }
        tattr = *backup;