diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2018-02-07 18:42:39 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2018-02-07 18:42:39 +0000 |
commit | a1376251af8400eb790bfd49b18be618ce52cfec (patch) | |
tree | 91cc1249620518cb82aa089233fb405c256e6fae /sys/arch/i386 | |
parent | daaef5da6590c024455467a485c056a095f2a95d (diff) |
Reporting the PXE boot interface we identified is independent of setting
the boot device. We do the latter only for NFSCLIENT, but always the former.
While here, modernize the interface matching loop.
ok deraadt@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/autoconf.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; |