summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/bootp_subr.c
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2003-10-31 18:32:15 +0000
committerbrooks <brooks@FreeBSD.org>2003-10-31 18:32:15 +0000
commitf1e94c6f29b079e4ad9d9305ef3e90a719bcbbda (patch)
tree4d9e6671d486576767506230a4240131526fea49 /sys/nfsclient/bootp_subr.c
parentbe546fdee455a96afdefee10d0bdba8547399f5b (diff)
downloadFreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.zip
FreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.tar.gz
Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r--sys/nfsclient/bootp_subr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index d79ecf8..957b360 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -339,7 +339,7 @@ bootpboot_p_rtentry(struct rtentry *rt)
printf(" ");
printf("flags %x", (unsigned short) rt->rt_flags);
printf(" %d", (int) rt->rt_rmx.rmx_expire);
- printf(" %s%d\n", rt->rt_ifp->if_name, rt->rt_ifp->if_unit);
+ printf(" %s\n", rt->rt_ifp->if_xname);
}
void
@@ -375,10 +375,8 @@ void
bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa)
{
- printf("%s%d flags %x, addr ",
- ifp->if_name,
- ifp->if_unit,
- ifp->if_flags);
+ printf("%s flags %x, addr ",
+ ifp->if_xname, ifp->if_flags);
print_sin_addr((struct sockaddr_in *) ifa->ifa_addr);
printf(", broadcast ");
print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr);
@@ -1667,8 +1665,8 @@ bootpc_init(void)
for (ifp = TAILQ_FIRST(&ifnet), ifctx = gctx->interfaces;
ifp != NULL && ifctx != NULL;
ifp = TAILQ_NEXT(ifp, if_link)) {
- snprintf(ifctx->ireq.ifr_name, sizeof(ifctx->ireq.ifr_name),
- "%s%d", ifp->if_name, ifp->if_unit);
+ strlcpy(ifctx->ireq.ifr_name, ifp->if_xname,
+ sizeof(ifctx->ireq.ifr_name));
#ifdef BOOTP_WIRED_TO
if (strcmp(ifctx->ireq.ifr_name,
__XSTRING(BOOTP_WIRED_TO)) != 0)
OpenPOWER on IntegriCloud