From e6259531fa4713de98172590ec09239395a2212c Mon Sep 17 00:00:00 2001 From: ru Date: Wed, 13 Mar 2002 11:03:36 +0000 Subject: [PATCH] Implement -m and -p loader(8) "boot" command options in boot2. (This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.) --- sbin/reboot/boot_i386.8 | 6 ++++-- sys/boot/i386/boot2/boot2.c | 10 +++++++--- sys/boot/i386/gptboot/gptboot.c | 10 +++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/sbin/reboot/boot_i386.8 b/sbin/reboot/boot_i386.8 index 4f7ee94880e1..779d9f083386 100644 --- a/sbin/reboot/boot_i386.8 +++ b/sbin/reboot/boot_i386.8 @@ -115,7 +115,7 @@ the listing will be of the relevant subdirectory.) .Ar bios_drive : Ns Ar interface Ns Po .Ar unit , Ns Ar part Pc .Ar filename -.Op Fl aCcDdghPprsv +.Op Fl aCcDdghmPprsv .Xc Specify boot file and flags. .Bl -tag -width indent @@ -161,7 +161,7 @@ The pathname of the file to boot (relative to the root directory on the specified partition). Defaults to .Pa /kernel . Symbolic links are not supported (hard links are). -.It Fl acCdDghPrsv +.It Fl aCcDdghmPprsv Boot flags: .Pp .Bl -tag -width "-CXX" -compact @@ -217,6 +217,8 @@ regardless of the option described here. See the man page for .Xr sio 4 for more details. +.It Fl m +mute the console. .It Fl P probe the keyboard. If no keyboard is found, the .Fl D diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index fd2145dc93d3..520753dad015 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -46,17 +46,19 @@ #define RBX_SERIAL 0xc /* -h */ #define RBX_CDROM 0xd /* -C */ #define RBX_GDB 0xf /* -g */ +#define RBX_MUTE 0x10 /* -m */ +#define RBX_PAUSE 0x12 /* -p */ #define RBX_DUAL 0x1d /* -D */ #define RBX_PROBEKBD 0x1e /* -P */ -#define RBX_MASK 0x2000ffff +#define RBX_MASK 0x2005ffff #define PATH_CONFIG "/boot.config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/kernel" #define ARGS 0x900 -#define NOPT 11 +#define NOPT 13 #define NDEV 5 #define MEM_BASE 0x12 #define MEM_EXT 0x15 @@ -98,7 +100,7 @@ static struct dmadat { extern uint32_t _end; -static const char optstr[NOPT] = "DhaCcdgPrsv"; +static const char optstr[NOPT] = "DhaCcdgmPprsv"; static const unsigned char flags[NOPT] = { RBX_DUAL, RBX_SERIAL, @@ -107,7 +109,9 @@ static const unsigned char flags[NOPT] = { RBX_CONFIG, RBX_KDB, RBX_GDB, + RBX_MUTE, RBX_PROBEKBD, + RBX_PAUSE, RBX_DFLTROOT, RBX_SINGLE, RBX_VERBOSE diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index fd2145dc93d3..520753dad015 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -46,17 +46,19 @@ #define RBX_SERIAL 0xc /* -h */ #define RBX_CDROM 0xd /* -C */ #define RBX_GDB 0xf /* -g */ +#define RBX_MUTE 0x10 /* -m */ +#define RBX_PAUSE 0x12 /* -p */ #define RBX_DUAL 0x1d /* -D */ #define RBX_PROBEKBD 0x1e /* -P */ -#define RBX_MASK 0x2000ffff +#define RBX_MASK 0x2005ffff #define PATH_CONFIG "/boot.config" #define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/kernel" #define ARGS 0x900 -#define NOPT 11 +#define NOPT 13 #define NDEV 5 #define MEM_BASE 0x12 #define MEM_EXT 0x15 @@ -98,7 +100,7 @@ static struct dmadat { extern uint32_t _end; -static const char optstr[NOPT] = "DhaCcdgPrsv"; +static const char optstr[NOPT] = "DhaCcdgmPprsv"; static const unsigned char flags[NOPT] = { RBX_DUAL, RBX_SERIAL, @@ -107,7 +109,9 @@ static const unsigned char flags[NOPT] = { RBX_CONFIG, RBX_KDB, RBX_GDB, + RBX_MUTE, RBX_PROBEKBD, + RBX_PAUSE, RBX_DFLTROOT, RBX_SINGLE, RBX_VERBOSE