diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/autoconf.c | 9 | ||||
-rw-r--r-- | sys/arch/i386/i386/autoconf.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c index ca8c9ad2877..cc91a3db70a 100644 --- a/sys/arch/amd64/amd64/autoconf.c +++ b/sys/arch/amd64/amd64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.50 2017/10/14 04:44:43 jsg Exp $ */ +/* $OpenBSD: autoconf.c,v 1.51 2018/02/07 18:42:38 naddy Exp $ */ /* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -196,18 +196,17 @@ diskconf(void) if (bios_bootmac) { struct ifnet *ifp; - for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &ifnet, if_list) { if (ifp->if_type == IFT_ETHER && - bcmp(bios_bootmac->mac, + memcmp(bios_bootmac->mac, ((struct arpcom *)ifp)->ac_enaddr, ETHER_ADDR_LEN) == 0) break; } if (ifp) { -#if defined(NFSCLIENT) printf("PXE boot MAC address %s, interface %s\n", ether_sprintf(bios_bootmac->mac), ifp->if_xname); +#if defined(NFSCLIENT) bootdv = parsedisk(ifp->if_xname, strlen(ifp->if_xname), 0, &tmpdev); part = 0; diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c index 865ac115e48..e3173d2d19d 100644 --- a/sys/arch/i386/i386/autoconf.c +++ b/sys/arch/i386/i386/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.104 2018/01/27 22:55:23 naddy Exp $ */ +/* $OpenBSD: autoconf.c,v 1.105 2018/02/07 18:42:38 naddy Exp $ */ /* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */ /*- @@ -236,18 +236,17 @@ diskconf(void) if (bios_bootmac) { struct ifnet *ifp; - for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &ifnet, if_list) { if (ifp->if_type == IFT_ETHER && - bcmp(bios_bootmac->mac, + memcmp(bios_bootmac->mac, ((struct arpcom *)ifp)->ac_enaddr, ETHER_ADDR_LEN) == 0) break; } if (ifp) { -#if defined(NFSCLIENT) printf("PXE boot MAC address %s, interface %s\n", ether_sprintf(bios_bootmac->mac), ifp->if_xname); +#if defined(NFSCLIENT) bootdv = parsedisk(ifp->if_xname, strlen(ifp->if_xname), 0, &tmpdev); part = 0; |