diff options
author | John Baldwin <jhb@FreeBSD.org> | 2008-02-28 17:08:05 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2008-02-28 17:08:05 +0000 |
commit | 5479fa1ad43d52e11414c80aa0efe5ee461070c6 (patch) | |
tree | 9e80b32c648f4bd8b9c87679072c039353af5bfb /sys/boot | |
parent | 62f261e751cfdd85446488f40e41c3035c7976b3 (diff) | |
download | src-5479fa1ad43d52e11414c80aa0efe5ee461070c6.tar.gz src-5479fa1ad43d52e11414c80aa0efe5ee461070c6.zip |
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
Notes
Notes:
svn path=/head/; revision=176644
Diffstat (limited to 'sys/boot')
-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 364fe6d4cf7b..2eb8b68e82f3 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 d5f545019b87..e9a183e0b1a7 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; } |