Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Only initialize when we are the first o...



details:   https://anonhg.NetBSD.org/src/rev/4ed86b84aaa5
branches:  trunk
changeset: 781827:4ed86b84aaa5
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Wed Oct 03 07:16:49 2012 +0000

description:
Only initialize when we are the first opener.

diffstat:

 sys/arch/sparc64/dev/sab.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 132e88ac41e8 -r 4ed86b84aaa5 sys/arch/sparc64/dev/sab.c
--- a/sys/arch/sparc64/dev/sab.c        Wed Oct 03 07:08:58 2012 +0000
+++ b/sys/arch/sparc64/dev/sab.c        Wed Oct 03 07:16:49 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sab.c,v 1.48 2011/06/02 00:24:23 christos Exp $        */
+/*     $NetBSD: sab.c,v 1.49 2012/10/03 07:16:49 mlelstv Exp $ */
 /*     $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $   */
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.48 2011/06/02 00:24:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.49 2012/10/03 07:16:49 mlelstv Exp $");
 
 #include "opt_kgdb.h"
 #include <sys/types.h>
@@ -677,7 +677,7 @@
                return (EBUSY);
 
        mutex_spin_enter(&tty_lock);
-       if ((tp->t_state & TS_ISOPEN) == 0) {
+       if (!ISSET(tp->t_state, TS_ISOPEN) && tp->t_wopen == 0) {
                ttychars(tp);
                tp->t_iflag = TTYDEF_IFLAG;
                tp->t_oflag = TTYDEF_OFLAG;



Home | Main Index | Thread Index | Old Index