diff options
author | ache <ache@FreeBSD.org> | 1997-07-26 18:47:56 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-07-26 18:47:56 +0000 |
commit | d2101515747cf74e35aa45c799aa8b0ad31c16ca (patch) | |
tree | 8d24783364febdd6fa713df5b019812d870b4b53 /sys | |
parent | 8195f84f44150b7704aca05f47ce0871e4cc0af7 (diff) | |
download | FreeBSD-src-d2101515747cf74e35aa45c799aa8b0ad31c16ca.zip FreeBSD-src-d2101515747cf74e35aa45c799aa8b0ad31c16ca.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_sl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index b0d1b7a..1abcab5 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; } } |