diff options
author | ache <ache@FreeBSD.org> | 1997-07-26 19:09:12 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-07-26 19:09:12 +0000 |
commit | 2270902ca29753a694b4eda0568321670cb81d4f (patch) | |
tree | a029377d856082e6b94b730296f7851d198165a1 /sys/net/if_sl.c | |
parent | d2101515747cf74e35aa45c799aa8b0ad31c16ca (diff) | |
download | FreeBSD-src-2270902ca29753a694b4eda0568321670cb81d4f.zip FreeBSD-src-2270902ca29753a694b4eda0568321670cb81d4f.tar.gz |
Forget to change units in prev. SUNIT commit. Move variales to local
section for SUNIT.
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r-- | sys/net/if_sl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 1abcab5..ceb81b1 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; } |