diff options
author | jhb <jhb@FreeBSD.org> | 2008-02-28 17:08:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-02-28 17:08:05 +0000 |
commit | 262d6673f72f9ca7f1150d8f6d2cb061c36be7b4 (patch) | |
tree | 9e80b32c648f4bd8b9c87679072c039353af5bfb /sys | |
parent | 8615065701283af6541df2aba2b7db5a2142c4a2 (diff) | |
download | FreeBSD-src-262d6673f72f9ca7f1150d8f6d2cb061c36be7b4.zip FreeBSD-src-262d6673f72f9ca7f1150d8f6d2cb061c36be7b4.tar.gz |
Rev 1.72 fixed a bug where if /boot.config changed the console its contents
weren't displayed on the new console. However, the config string has been
altered as part of being parsed so we only display the first option. Fix
this by saving a copy of /boot.config before parsing it and displaying the
saved copy after parsing.
MFC after: 1 week
PR: i386/103972
Submitted by: Alexandre Belloni alexandre.belloni of netasq.com
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/boot2/boot2.c | 5 | ||||
-rw-r--r-- | sys/boot/i386/gptboot/gptboot.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 364fe6d..2eb8b68 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -129,7 +129,7 @@ static struct dsk { unsigned start; int init; } dsk; -static char cmd[512]; +static char cmd[512], cmddup[512]; static char kname[1024]; static uint32_t opts; static int comspeed = SIOSPD; @@ -255,10 +255,11 @@ main(void) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { + memcpy(cmddup, cmd, sizeof(cmd)); if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmd); + printf("%s: %s", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index d5f5450..e9a183e 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -127,7 +127,7 @@ static struct dsk { daddr_t start; int init; } dsk; -static char cmd[512]; +static char cmd[512], cmddup[512]; static char kname[1024]; static uint32_t opts; static int comspeed = SIOSPD; @@ -253,10 +253,11 @@ main(void) fsread(ino, cmd, sizeof(cmd)); if (*cmd) { + memcpy(cmddup, cmd, sizeof(cmd)); if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmd); + printf("%s: %s", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } |