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
This commit is contained in:
John Baldwin 2008-02-28 17:08:05 +00:00
parent 62f261e751
commit 5479fa1ad4
2 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}