Module Name:    src
Committed By:   mlelstv
Date:           Wed Oct  3 07:16:49 UTC 2012

Modified Files:
        src/sys/arch/sparc64/dev: sab.c

Log Message:
Only initialize when we are the first opener.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/sparc64/dev/sab.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/dev/sab.c
diff -u src/sys/arch/sparc64/dev/sab.c:1.48 src/sys/arch/sparc64/dev/sab.c:1.49
--- src/sys/arch/sparc64/dev/sab.c:1.48	Thu Jun  2 00:24:23 2011
+++ src/sys/arch/sparc64/dev/sab.c	Wed Oct  3 07:16:49 2012
@@ -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 @@ sabopen(dev_t dev, int flags, int mode, 
 		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;

Reply via email to