From: tholo Date: Thu, 14 Mar 1996 08:41:45 +0000 (+0000) Subject: From Lite2; mark terminal devices as exclusively opened before flushing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=371a9016d01d1945cb9ed4967a1f0b4b83072258;p=openbsd From Lite2; mark terminal devices as exclusively opened before flushing --- 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 /*