From b2296ca150700030daa61114c4d19692d9a4cb0c Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 26 Jul 1997 19:09:12 +0000 Subject: [PATCH] Forget to change units in prev. SUNIT commit. Move variales to local section for SUNIT. --- sys/net/if_sl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 1abcab5f9c90..ceb81b196505 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 - * $Id: if_sl.c,v 1.52 1997/03/24 11:33:14 bde Exp $ + * $Id: if_sl.c,v 1.53 1997/07/26 18:47:56 ache Exp $ */ /* @@ -366,7 +366,7 @@ sltioctl(tp, cmd, data, flag, p) int flag; struct proc *p; { - struct sl_softc *sc = (struct sl_softc *)tp->t_sc, *nc, tmpc; + struct sl_softc *sc = (struct sl_softc *)tp->t_sc; int s, nsl; s = splimp(); @@ -377,13 +377,18 @@ sltioctl(tp, cmd, data, flag, p) case SLIOCSUNIT: if (sc->sc_if.if_unit != *(u_int *)data) { + int scunit = sc->sc_if.if_unit; + struct sl_softc *nc, tmpc; + for (nsl = NSL, nc = sl_softc; --nsl >= 0; nc++) { if ( nc->sc_if.if_unit == *(u_int *)data && nc->sc_ttyp == NULL ) { tmpc = *nc; *nc = *sc; + nc->sc_if.if_unit = *(u_int *)data; *sc = tmpc; + sc->sc_if.if_unit = scunit; tp->t_sc = sc = nc; goto slfound; }