aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGuido van Rooij <guido@FreeBSD.org>2001-12-10 20:02:22 +0000
committerGuido van Rooij <guido@FreeBSD.org>2001-12-10 20:02:22 +0000
commit28703190c508bd3fce0707743392b78592a14b67 (patch)
tree2c02555b14b96857d5aafe414d930838b85fc62f /sys
parent3809d6a1b984631b628e0378e67d830507f3ead2 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/autoconf.c2
-rw-r--r--sys/boot/i386/libi386/bootinfo.c3
-rw-r--r--sys/boot/i386/libi386/bootinfo32.c3
-rw-r--r--sys/boot/i386/libi386/bootinfo64.c3
-rw-r--r--sys/i386/i386/autoconf.c2
-rw-r--r--sys/kern/tty_cons.c24
-rw-r--r--sys/sys/cons.h1
-rw-r--r--sys/sys/reboot.h1
8 files changed, 37 insertions, 2 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index 95943cd209900..a816eedecfde4 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -176,7 +176,7 @@ configure_final(dummy)
{
int i;
-/* cninit_finish(); */
+ cninit_finish();
if (bootverbose) {
diff --git a/sys/boot/i386/libi386/bootinfo.c b/sys/boot/i386/libi386/bootinfo.c
index 8e5c752fe4c3c..1c6b1d23e2281 100644
--- a/sys/boot/i386/libi386/bootinfo.c
+++ b/sys/boot/i386/libi386/bootinfo.c
@@ -100,6 +100,9 @@ bi_getboothowto(char *kargs)
case 'h':
howto |= RB_SERIAL;
break;
+ case 'p':
+ howto |= RB_PAUSE;
+ break;
case 'r':
howto |= RB_DFLTROOT;
break;
diff --git a/sys/boot/i386/libi386/bootinfo32.c b/sys/boot/i386/libi386/bootinfo32.c
index 8e5c752fe4c3c..1c6b1d23e2281 100644
--- a/sys/boot/i386/libi386/bootinfo32.c
+++ b/sys/boot/i386/libi386/bootinfo32.c
@@ -100,6 +100,9 @@ bi_getboothowto(char *kargs)
case 'h':
howto |= RB_SERIAL;
break;
+ case 'p':
+ howto |= RB_PAUSE;
+ break;
case 'r':
howto |= RB_DFLTROOT;
break;
diff --git a/sys/boot/i386/libi386/bootinfo64.c b/sys/boot/i386/libi386/bootinfo64.c
index 8e5c752fe4c3c..1c6b1d23e2281 100644
--- a/sys/boot/i386/libi386/bootinfo64.c
+++ b/sys/boot/i386/libi386/bootinfo64.c
@@ -100,6 +100,9 @@ bi_getboothowto(char *kargs)
case 'h':
howto |= RB_SERIAL;
break;
+ case 'p':
+ howto |= RB_PAUSE;
+ break;
case 'r':
howto |= RB_DFLTROOT;
break;
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index 95943cd209900..a816eedecfde4 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -176,7 +176,7 @@ configure_final(dummy)
{
int i;
-/* cninit_finish(); */
+ cninit_finish();
if (bootverbose) {
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index d25e420370545..ad752057c7dd3 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -55,6 +55,8 @@
#include <sys/uio.h>
#include <sys/vnode.h>
+#include <ddb/ddb.h>
+
#include <machine/cpu.h>
static d_open_t cnopen;
@@ -112,6 +114,9 @@ static int cn_mute;
static int openflag; /* how /dev/console was opened */
static int cn_is_open;
static dev_t cn_devfsdev; /* represents the device private info */
+static u_char console_pausing; /* pause after each line during probe */
+static char *console_pausestr=
+"<pause; press any key to proceed to next line or '.' to end pause mode>";
void cndebug(char *);
@@ -162,12 +167,20 @@ cninit(void)
cnadd(best_cn);
best_cn->cn_init(best_cn);
}
+ if (boothowto & RB_PAUSE)
+ console_pausing = 1;
/*
* Make the best console the preferred console.
*/
cnselect(best_cn);
}
+void
+cninit_finish()
+{
+ console_pausing = 0;
+}
+
/* add a new physical console to back the virtual console */
int
cnadd(struct consdev *cn)
@@ -526,6 +539,7 @@ cnputc(int c)
{
struct cn_device *cnd;
struct consdev *cn;
+ char *cp;
if (cn_mute || c == '\0')
return;
@@ -535,6 +549,16 @@ cnputc(int c)
cn->cn_putc(cn->cn_dev, '\r');
cn->cn_putc(cn->cn_dev, c);
}
+ if (console_pausing && !db_active && (c == '\n')) {
+ for (cp = console_pausestr; *cp != '\0'; cp++)
+ cnputc(*cp);
+ if (cngetc() == '.')
+ console_pausing = 0;
+ cnputc('\r');
+ for (cp = console_pausestr; *cp != '\0'; cp++)
+ cnputc(' ');
+ cnputc('\r');
+ }
}
void
diff --git a/sys/sys/cons.h b/sys/sys/cons.h
index 73f2e9da6c54f..a65647ec0387d 100644
--- a/sys/sys/cons.h
+++ b/sys/sys/cons.h
@@ -88,6 +88,7 @@ extern int cons_unavail;
/* Other kernel entry points. */
void cninit(void);
+void cninit_finish(void);
int cnadd(struct consdev *);
void cnremove(struct consdev *);
void cnselect(struct consdev *);
diff --git a/sys/sys/reboot.h b/sys/sys/reboot.h
index 19e7cc36405c7..0a45bcba0495d 100644
--- a/sys/sys/reboot.h
+++ b/sys/sys/reboot.h
@@ -61,6 +61,7 @@
#define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */
#define RB_MUTE 0x10000 /* Come up with the console muted */
#define RB_SELFTEST 0x20000 /* don't boot to normal operation, do selftest */
+#define RB_PAUSE 0x40000 /* pause after each output line during probe */
#define RB_MULTIPLE 0x20000000 /* Use multiple consoles */
#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */