diff options
author | brooks <brooks@FreeBSD.org> | 2006-07-15 02:07:38 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2006-07-15 02:07:38 +0000 |
commit | ad34385a76cd9fb08a281ce2179dd2b2358987ce (patch) | |
tree | 83051012175f25fa449b328f28d286a4e3719e07 | |
parent | 1d520bd714ecf8e52a127b30ce81941e322cfd29 (diff) | |
download | FreeBSD-src-ad34385a76cd9fb08a281ce2179dd2b2358987ce.zip FreeBSD-src-ad34385a76cd9fb08a281ce2179dd2b2358987ce.tar.gz |
Cleanup: Use if_initname to set if_dname, if_dunit, and if_xname instead
of doing it by hand.
-rw-r--r-- | sys/dev/lmc/if_lmc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/lmc/if_lmc.c b/sys/dev/lmc/if_lmc.c index a7e73a6..35ce7a9 100644 --- a/sys/dev/lmc/if_lmc.c +++ b/sys/dev/lmc/if_lmc.c @@ -4826,9 +4826,7 @@ setup_ifnet(struct ifnet *ifp) (const char *)ifp->if_name = device_get_name(sc->dev); ifp->if_unit = device_get_unit(sc->dev); # elif (__FreeBSD_version >= 502000) - ifp->if_dname = device_get_name(sc->dev); - ifp->if_dunit = device_get_unit(sc->dev); - strlcpy(ifp->if_xname, device_get_nameunit(sc->dev), IFNAMSIZ); + if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); # elif defined(__NetBSD__) strcpy(ifp->if_xname, sc->dev.dv_xname); # elif __OpenBSD__ |