From 5d43ae93ae445548587ca967e8e3158efc0e9109 Mon Sep 17 00:00:00 2001 From: imp Date: Mon, 13 Jan 2003 21:28:24 +0000 Subject: Fix interactive booting: o Revision 1.38 introduced the -n flag. It conflicted with the RB_BOOTINFO flag, so was in effect always on. Change the -n flag to be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed /boot.config would render the system unbootable because the user was unable to enter anything at all on the command line. o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit out and do not otherwise use it. Reviewed by: jhb MFC after: 3 days --- sys/boot/i386/boot2/boot2.c | 6 ++++-- sys/boot/i386/gptboot/gptboot.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 4f622967..6105ddc 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -51,10 +51,12 @@ #define RBX_GDB 0xf /* -g */ #define RBX_MUTE 0x10 /* -m */ #define RBX_PAUSE 0x12 /* -p */ +#define RBX_NOINTR 0x1c /* -n */ #define RBX_DUAL 0x1d /* -D */ #define RBX_PROBEKBD 0x1e /* -P */ -#define RBX_NOINTR 0x1f /* -n */ +/* 0x1f is reserved for the historical RB_BOOTINFO option */ +/* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */ #define RBX_MASK 0x2005ffff #define PATH_CONFIG "/boot.config" @@ -109,7 +111,7 @@ static struct dsk { } dsk; static char cmd[512]; static char kname[1024]; -static uint32_t opts = RB_BOOTINFO; +static uint32_t opts = 0; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index 4f622967..6105ddc 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -51,10 +51,12 @@ #define RBX_GDB 0xf /* -g */ #define RBX_MUTE 0x10 /* -m */ #define RBX_PAUSE 0x12 /* -p */ +#define RBX_NOINTR 0x1c /* -n */ #define RBX_DUAL 0x1d /* -D */ #define RBX_PROBEKBD 0x1e /* -P */ -#define RBX_NOINTR 0x1f /* -n */ +/* 0x1f is reserved for the historical RB_BOOTINFO option */ +/* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */ #define RBX_MASK 0x2005ffff #define PATH_CONFIG "/boot.config" @@ -109,7 +111,7 @@ static struct dsk { } dsk; static char cmd[512]; static char kname[1024]; -static uint32_t opts = RB_BOOTINFO; +static uint32_t opts = 0; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; -- cgit v1.1