From 0229106442e2776afd32939f47f30965a957ecfb Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 26 Jul 1997 18:47:56 +0000 Subject: [PATCH] Exchange whole structures on SUNIT, not unit+flags fields only. It is needed because if_attach() assumes fixed units order and pass it to ifconfig --- sys/net/if_sl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index b0d1b7a63e6f..1abcab5f9c90 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.51 1997/03/23 03:37:15 bde Exp $ + * $Id: if_sl.c,v 1.52 1997/03/24 11:33:14 bde 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; + struct sl_softc *sc = (struct sl_softc *)tp->t_sc, *nc, tmpc; int s, nsl; s = splimp(); @@ -381,10 +381,10 @@ sltioctl(tp, cmd, data, flag, p) if ( nc->sc_if.if_unit == *(u_int *)data && nc->sc_ttyp == NULL ) { - nc->sc_if.if_unit = sc->sc_if.if_unit; - nc->sc_flags &= ~SC_STATIC; - nc->sc_flags |= sc->sc_flags & SC_STATIC; - sc->sc_if.if_unit = *(u_int *)data; + tmpc = *nc; + *nc = *sc; + *sc = tmpc; + tp->t_sc = sc = nc; goto slfound; } }