cvs commit: src/sys/boot/i386/boot2 boot2.c src/sys/boot/i386/libi386 comconsole.c src/sys/boot/i386/loader main.c
YONETANI Tomokazu
qhwt+dfly at les.ath.cx
Wed May 4 10:35:54 PDT 2005
[replying to a very old mail]
On Sat, Jun 26, 2004 at 03:37:11PM -0700, Matthew Dillon wrote:
> http://www.dragonflybsd.org/cvsweb/src/sys/boot/i386/boot2/boot2.c.diff?r1=1.7&r2=1.8&f=u
Why is the conditional "cmd[0] == 0" just before the second call
to parse() needed? It totally disables the boot.config feature,
and hitting Enter key ends up with a beep and won't let you use
the default configuration shown on the console.
[at the beginning of main()]
/* Process configuration file */
autoboot = 1;
if ((ino = lookup(PATH_CONFIG)))
fsread(ino, cmd, sizeof(cmd));
if (cmd[0]) {
printf("%s: %s", PATH_CONFIG, cmd);
if (parse())
autoboot = 0;
/* Do not process this command twice */
*cmd = 0;
}
:
[at the bottom of main()]
/* Present the user with the boot2 prompt. */
for (;;) {
printf("\nDragonFly boot\n"
"%u:%s(%u,%c)%s: ",
dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit,
'a' + dsk.part, kname);
if (!autoboot || keyhit(5*SECOND))
getstr();
else
putchar('\n');
autoboot = 0;
if (cmd[0] == 0 || parse()) /* <-- HERE */
putchar('\a');
else
load();
}
}
More information about the Commits
mailing list