summaryrefslogtreecommitdiff
path: root/sys/stand
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2007-04-27 10:08:35 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2007-04-27 10:08:35 +0000
commita6fbb0d5794262d14d0b4dd073621abe323c5e1f (patch)
tree16bdf3529a71b9d93637ca61b4b32ad4221efd3d /sys/stand
parent0cf9d988c4916ba3299a05e1f4f8fb46b8f2c7ff (diff)
Check for Control key held down when starting, and don't read boot.conf
if it is. This gives a way to recover from "switching to com0" when there's no serial cable handy. Bump version numbers. A similar change will be made to amd64 boot soon. ok toby@ deraadt@
Diffstat (limited to 'sys/stand')
-rw-r--r--sys/stand/boot/cmd.c13
1 files changed, 12 insertions, 1 deletions
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));