summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-11 17:53:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-11 17:53:19 +0000
commita205b583b766276393a32258200f8ab6635b0c73 (patch)
tree61efbebcdfdf3031e836bef589a386524aca31af /sys/arch/i386
parentea3a215b72ffece821e6b68e94ad26b7526d1261 (diff)
if we pxebooted, and can find the interface, put it in a "pxeboot" group
so that later applications can try to do the right thing for reyk
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/autoconf.c17
-rw-r--r--sys/arch/i386/i386/bios.c6
2 files changed, 9 insertions, 14 deletions
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c
index 109a719a94c..26ad97903c5 100644
--- a/sys/arch/i386/i386/autoconf.c
+++ b/sys/arch/i386/i386/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.76 2007/11/28 17:05:09 tedu Exp $ */
+/* $OpenBSD: autoconf.c,v 1.77 2007/12/11 17:53:16 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */
/*-
@@ -178,9 +178,7 @@ diskconf(void)
struct device *bootdv = NULL;
dev_t tmpdev;
char buf[128];
-#if defined(NFSCLIENT)
extern bios_bootmac_t *bios_bootmac;
-#endif
dkcsumattach();
@@ -193,12 +191,9 @@ diskconf(void)
bootdv = parsedisk(buf, strlen(buf), part, &tmpdev);
}
-#if defined(NFSCLIENT)
if (bios_bootmac) {
struct ifnet *ifp;
- printf("PXE boot MAC address %s, ",
- ether_sprintf(bios_bootmac->mac));
for (ifp = TAILQ_FIRST(&ifnet); ifp != NULL;
ifp = TAILQ_NEXT(ifp, if_list)) {
if ((ifp->if_type == IFT_ETHER ||
@@ -209,15 +204,19 @@ diskconf(void)
break;
}
if (ifp) {
- printf("interface %s\n", ifp->if_xname);
+ if_addgroup(ifp, "pxeboot");
+#if defined(NFSCLIENT)
+ printf("PXE boot MAC address %s, interface %s",
+ ether_sprintf(bios_bootmac->mac), ifp->if_xname);
mountroot = nfs_mountroot; /* potentially */
bootdv = parsedisk(ifp->if_xname, strlen(ifp->if_xname),
0, &tmpdev);
part = 0;
+#endif
} else
- printf("unknown interface\n");
+ printf("PXE boot MAC address %s, interface %s\n",
+ ether_sprintf(bios_bootmac->mac), "unknown");
}
-#endif
setroot(bootdv, part, RB_USERREQ);
dumpconf();
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c
index 74fc30f9ed2..4820a6dc2fd 100644
--- a/sys/arch/i386/i386/bios.c
+++ b/sys/arch/i386/i386/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.75 2007/12/05 19:17:13 deraadt Exp $ */
+/* $OpenBSD: bios.c,v 1.76 2007/12/11 17:53:16 deraadt Exp $ */
/*
* Copyright (c) 1997-2001 Michael Shalayeff
@@ -100,9 +100,7 @@ struct smbios_entry smbios_entry;
#ifdef MULTIPROCESSOR
void *bios_smpinfo;
#endif
-#ifdef NFSCLIENT
bios_bootmac_t *bios_bootmac;
-#endif
void smbios_info(char*);
@@ -498,11 +496,9 @@ bios_getopt()
break;
#endif
-#ifdef NFSCLIENT
case BOOTARG_BOOTMAC:
bios_bootmac = (bios_bootmac_t *)q->ba_arg;
break;
-#endif
default:
#ifdef BIOS_DEBUG