summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-03-14 08:41:46 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-03-14 08:41:46 +0000
commitc8f6f315d988fa0aa0bb0241201a77c283258b4c (patch)
treeff3ec1949c5b9aabc7350bc4e29aec0c08606787 /sys
parent0415e86d8fc318b1dc0b4291f7cfdd37fb16014a (diff)
From Lite2; mark terminal devices as exclusively opened before flushing
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_sl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index edd75797b8c..c7f986732e8 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sl.c,v 1.2 1996/03/03 21:07:10 niklas Exp $ */
+/* $OpenBSD: if_sl.c,v 1.3 1996/03/14 08:41:45 tholo Exp $ */
/* $NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@@ -255,9 +255,7 @@ slopen(dev, tp)
register struct sl_softc *sc;
register int nsl;
int error;
-#ifdef NetBSD
int s;
-#endif
if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
@@ -272,6 +270,9 @@ slopen(dev, tp)
tp->t_sc = (caddr_t)sc;
sc->sc_ttyp = tp;
sc->sc_if.if_baudrate = tp->t_ospeed;
+ s = spltty();
+ tp->t_state |= TS_ISOPEN | TS_XCLUDE;
+ splx(s);
ttyflush(tp, FREAD | FWRITE);
#ifdef NetBSD
/*