summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/i386/stand/boot/boot.87
-rw-r--r--sys/arch/i386/stand/boot/conf.c4
-rw-r--r--sys/arch/i386/stand/cdboot/cdboot.86
-rw-r--r--sys/arch/i386/stand/cdboot/conf.c4
-rw-r--r--sys/arch/i386/stand/libsa/bioscons.c13
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.h3
-rw-r--r--sys/arch/i386/stand/libsa/libsa.h4
-rw-r--r--sys/arch/i386/stand/libsa/machdep.c9
-rw-r--r--sys/arch/i386/stand/pxeboot/conf.c4
-rw-r--r--sys/arch/i386/stand/pxeboot/pxeboot.86
-rw-r--r--sys/stand/boot/cmd.c13
11 files changed, 59 insertions, 14 deletions
diff --git a/sys/arch/i386/stand/boot/boot.8 b/sys/arch/i386/stand/boot/boot.8
index 430fafb9146..fccd421c520 100644
--- a/sys/arch/i386/stand/boot/boot.8
+++ b/sys/arch/i386/stand/boot/boot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: boot.8,v 1.44 2006/05/15 09:10:52 jmc Exp $
+.\" $OpenBSD: boot.8,v 1.45 2007/04/27 10:08:34 tom Exp $
.\"
.\" Copyright (c) 1997-2001 Michael Shalayeff
.\" All rights reserved.
@@ -106,6 +106,11 @@ This file may contain any commands
.Nm
accepts at the interactive prompt.
Though default settings usually suffice, they can be changed here.
+.Pp
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.It
The header line
.Pp
diff --git a/sys/arch/i386/stand/boot/conf.c b/sys/arch/i386/stand/boot/conf.c
index eccab2b9c29..0539fc234f0 100644
--- a/sys/arch/i386/stand/boot/conf.c
+++ b/sys/arch/i386/stand/boot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.35 2007/01/02 16:29:27 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.36 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -43,7 +43,7 @@
#include <dev/cons.h>
#include "debug.h"
-const char version[] = "2.13";
+const char version[] = "2.14";
int debug = 1;
diff --git a/sys/arch/i386/stand/cdboot/cdboot.8 b/sys/arch/i386/stand/cdboot/cdboot.8
index e265dddc4c5..eb9525a08a3 100644
--- a/sys/arch/i386/stand/cdboot/cdboot.8
+++ b/sys/arch/i386/stand/cdboot/cdboot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cdboot.8,v 1.5 2006/10/31 11:29:54 tom Exp $
+.\" $OpenBSD: cdboot.8,v 1.6 2007/04/27 10:08:34 tom Exp $
.\" Copyright (c) 2004 Tom Cosgrove
.\" Copyright (c) 2003 Matthias Drochner
.\" Copyright (c) 1999 Doug White
@@ -46,6 +46,10 @@ will look for an
configuration
file on the CD-ROM.
If it finds one, it processes the commands within it.
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.Pp
.Nm
then sits in a loop,
diff --git a/sys/arch/i386/stand/cdboot/conf.c b/sys/arch/i386/stand/cdboot/conf.c
index 1e620e4bcb1..241fdec2fdc 100644
--- a/sys/arch/i386/stand/cdboot/conf.c
+++ b/sys/arch/i386/stand/cdboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.7 2007/01/02 16:29:27 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.8 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -43,7 +43,7 @@
#include <dev/cons.h>
#include "debug.h"
-const char version[] = "1.06";
+const char version[] = "1.07";
int debug = 1;
#undef _TEST
diff --git a/sys/arch/i386/stand/libsa/bioscons.c b/sys/arch/i386/stand/libsa/bioscons.c
index e565159fe75..9447abdadf4 100644
--- a/sys/arch/i386/stand/libsa/bioscons.c
+++ b/sys/arch/i386/stand/libsa/bioscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioscons.c,v 1.28 2007/01/02 16:29:27 tom Exp $ */
+/* $OpenBSD: bioscons.c,v 1.29 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -95,6 +95,17 @@ pc_getc(dev_t dev)
return (rv & 0xff);
}
+int
+pc_getshifts(dev_t dev)
+{
+ register int rv;
+
+ __asm __volatile(DOINT(0x16) : "=a" (rv) : "0" (0x200) :
+ "%ecx", "%edx", "cc" );
+
+ return (rv & 0xff);
+}
+
void
pc_putc(dev_t dev, int c)
{
diff --git a/sys/arch/i386/stand/libsa/biosdev.h b/sys/arch/i386/stand/libsa/biosdev.h
index 68fc0277e93..1c6629e356a 100644
--- a/sys/arch/i386/stand/libsa/biosdev.h
+++ b/sys/arch/i386/stand/libsa/biosdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.h,v 1.30 2003/09/16 03:43:11 fgsch Exp $ */
+/* $OpenBSD: biosdev.h,v 1.31 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -60,6 +60,7 @@ bios_diskinfo_t *bios_dklookup(int);
void pc_probe(struct consdev *);
void pc_init(struct consdev *);
int pc_getc(dev_t);
+int pc_getshifts(dev_t);
void pc_putc(dev_t, int);
void pc_pollc(dev_t, int);
void com_probe(struct consdev *);
diff --git a/sys/arch/i386/stand/libsa/libsa.h b/sys/arch/i386/stand/libsa/libsa.h
index 69a02d9c44a..56dea3b79c6 100644
--- a/sys/arch/i386/stand/libsa/libsa.h
+++ b/sys/arch/i386/stand/libsa/libsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: libsa.h,v 1.43 2006/09/18 21:14:15 mpf Exp $ */
+/* $OpenBSD: libsa.h,v 1.44 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -78,3 +78,5 @@ extern bios_diskinfo_t bios_diskinfo[];
extern u_int32_t bios_cksumlen;
#define MACHINE_CMD cmd_machine /* we have i386-specific commands */
+
+#define CHECK_SKIP_CONF check_skip_conf /* we can skip boot.conf with Ctrl */
diff --git a/sys/arch/i386/stand/libsa/machdep.c b/sys/arch/i386/stand/libsa/machdep.c
index 5dc8cf90680..1e77754e561 100644
--- a/sys/arch/i386/stand/libsa/machdep.c
+++ b/sys/arch/i386/stand/libsa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.35 2004/03/19 13:48:18 tom Exp $ */
+/* $OpenBSD: machdep.c,v 1.36 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -28,6 +28,7 @@
*/
#include "libsa.h"
+#include "biosdev.h"
#include <machine/apmvar.h>
#include <machine/biosvar.h>
@@ -61,3 +62,9 @@ machdep(void)
}
}
}
+
+int check_skip_conf(void)
+{
+ /* Return non-zero (skip boot.conf) if Control "shift" key down */
+ return (pc_getshifts(0) & 0x04);
+}
diff --git a/sys/arch/i386/stand/pxeboot/conf.c b/sys/arch/i386/stand/pxeboot/conf.c
index 56555796e21..c194d8b16b3 100644
--- a/sys/arch/i386/stand/pxeboot/conf.c
+++ b/sys/arch/i386/stand/pxeboot/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.11 2007/01/02 16:29:27 tom Exp $ */
+/* $OpenBSD: conf.c,v 1.12 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
@@ -46,7 +46,7 @@
#include "pxeboot.h"
#include "pxe_net.h"
-const char version[] = "1.11";
+const char version[] = "1.12";
int debug = 1;
#undef _TEST
diff --git a/sys/arch/i386/stand/pxeboot/pxeboot.8 b/sys/arch/i386/stand/pxeboot/pxeboot.8
index c54812b04ff..1ca0c4106e5 100644
--- a/sys/arch/i386/stand/pxeboot/pxeboot.8
+++ b/sys/arch/i386/stand/pxeboot/pxeboot.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pxeboot.8,v 1.6 2007/02/12 22:13:07 jmc Exp $
+.\" $OpenBSD: pxeboot.8,v 1.7 2007/04/27 10:08:34 tom Exp $
.\" Copyright (c) 2004 Tom Cosgrove
.\" Copyright (c) 2003 Matthias Drochner
.\" Copyright (c) 1999 Doug White
@@ -55,6 +55,10 @@ boot program will look for an
configuration
file on the TFTP server.
If it finds one, it processes the commands within it.
+.Pa boot.conf
+processing can be skipped by holding down either Control key as
+.Nm
+starts.
.Pp
.Nm
then sits in a loop,
diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c
index 1d91e5d74c7..f59531aaf8b 100644
--- a/sys/stand/boot/cmd.c
+++ b/sys/stand/boot/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.58 2007/02/21 13:17:12 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.59 2007/04/27 10:08:34 tom Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -56,6 +56,10 @@ extern const struct cmd_table MACHINE_CMD[];
extern int Xset(void);
extern int Xenv(void);
+#ifdef CHECK_SKIP_CONF
+extern int CHECK_SKIP_CONF(void);
+#endif
+
extern const struct cmd_table cmd_set[];
const struct cmd_table cmd_table[] = {
{"#", CMDT_CMD, Xnop}, /* XXX must be first */
@@ -101,6 +105,13 @@ read_conf(void)
#endif
int fd, rc = 0;
+#ifdef CHECK_SKIP_CONF
+ if (CHECK_SKIP_CONF()) {
+ printf("boot.conf processing skipped at operator request\n");
+ return -1; /* Pretend file wasn't found */
+ }
+#endif
+
if ((fd = open(qualify(cmd.conf), 0)) < 0) {
if (errno != ENOENT && errno != ENXIO) {
printf("open(%s): %s\n", cmd.path, strerror(errno));