Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern In ttywait_timo(), break out of loop on all errors, ...



details:   https://anonhg.NetBSD.org/src/rev/2d26f7ed1598
branches:  trunk
changeset: 810318:2d26f7ed1598
user:      gson <gson%NetBSD.org@localhost>
date:      Tue Aug 25 12:55:30 2015 +0000

description:
In ttywait_timo(), break out of loop on all errors, not just
EWOULDBLOCK, as ttywait() did prior to 1.265.

diffstat:

 sys/kern/tty.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 6f8d04d5111a -r 2d26f7ed1598 sys/kern/tty.c
--- a/sys/kern/tty.c    Tue Aug 25 11:08:59 2015 +0000
+++ b/sys/kern/tty.c    Tue Aug 25 12:55:30 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $  */
+/*     $NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.266 2015/08/24 22:50:32 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.267 2015/08/25 12:55:30 gson Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1552,10 +1552,10 @@
            CONNECTED(tp) && tp->t_oproc) {
                (*tp->t_oproc)(tp);
                error = ttysleep(tp, &tp->t_outcv, true, timo);
-               if (error == EWOULDBLOCK) {
+               if (error == EWOULDBLOCK)
                        ttyflush(tp, FWRITE);
+               if (error)
                        break;
-               }
        }
        mutex_spin_exit(&tty_lock);
 



Home | Main Index | Thread Index | Old Index