summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-12 21:00:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-12 21:00:57 +0000
commitff09abaf9b075599d54301176ae4757dc8f2253a (patch)
tree4c0c2013343472abe81fde0ad9dfa17e930b93c6
parent3a4304c449c71167e6c769651f26a34b9f0cb362 (diff)
Make sboot really match its documented behaviour when booting without an
interface name.
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_ie.c5
-rw-r--r--sys/arch/mvme88k/stand/netboot/if_le.c5
-rw-r--r--sys/arch/mvme88k/stand/sboot/sboot.c3
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/stand/netboot/if_ie.c b/sys/arch/mvme88k/stand/netboot/if_ie.c
index da7685952fd..70816e16fa9 100644
--- a/sys/arch/mvme88k/stand/netboot/if_ie.c
+++ b/sys/arch/mvme88k/stand/netboot/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.10 2013/05/12 10:43:45 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.11 2013/05/12 21:00:56 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -84,7 +84,8 @@ ie_match(struct netif *nif, void *machdep_hint)
const char *name = machdep_hint;
if (name == NULL) {
- if (ie_config[nif->nif_unit].clun == bugargs.ctrl_lun)
+ if (ie_config[nif->nif_unit].clun == bugargs.ctrl_lun ||
+ (int)bugargs.ctrl_lun < 0)
return 1;
} else {
if (bcmp(ie_driver.netif_bname, name, 2) == 0) {
diff --git a/sys/arch/mvme88k/stand/netboot/if_le.c b/sys/arch/mvme88k/stand/netboot/if_le.c
index 968dc4cfd15..c52e85cdd11 100644
--- a/sys/arch/mvme88k/stand/netboot/if_le.c
+++ b/sys/arch/mvme88k/stand/netboot/if_le.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le.c,v 1.8 2013/05/12 10:43:45 miod Exp $ */
+/* $OpenBSD: if_le.c,v 1.9 2013/05/12 21:00:56 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -139,7 +139,8 @@ le_match(struct netif *nif, void *machdep_hint)
const char *name = machdep_hint;
if (name == NULL) {
- if (le_config[nif->nif_unit].clun == bugargs.ctrl_lun)
+ if (le_config[nif->nif_unit].clun == bugargs.ctrl_lun ||
+ (int)bugargs.ctrl_lun < 0)
return 1;
} else {
if (bcmp(le_driver.netif_bname, name, 2) == 0) {
diff --git a/sys/arch/mvme88k/stand/sboot/sboot.c b/sys/arch/mvme88k/stand/sboot/sboot.c
index 4094194c23c..c4fcfc8bd92 100644
--- a/sys/arch/mvme88k/stand/sboot/sboot.c
+++ b/sys/arch/mvme88k/stand/sboot/sboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sboot.c,v 1.6 2013/05/12 10:43:45 miod Exp $ */
+/* $OpenBSD: sboot.c,v 1.7 2013/05/12 21:00:56 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -86,6 +86,7 @@ main()
display_ethernet();
howto = 0;
+ bugargs.ctrl_lun = -1;
for (;;) {
printf("boot: ");