i386/103972: [boot] boot loader doesn't display right /boot.config
parameters
Alexandre Belloni
alexandre.belloni at netasq.com
Wed Oct 4 05:40:18 PDT 2006
>Number: 103972
>Category: i386
>Synopsis: [boot] boot loader doesn't display right /boot.config parameters
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-i386
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 04 12:40:09 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Alexandre Belloni
>Release: FreeBSD 6.1-STABLE i386
>Organization:
Netasq
>Environment:
System: FreeBSD alexandreb.netasq.com 6.1-STABLE FreeBSD 6.1-STABLE #11: Fri Aug 11 14:04:23 CEST 2006 root at alexandreb.netasq.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The boot loader won't display all the parameters present in /boot.config because the parse() function will alter the string before displaying it.
>How-To-Repeat:
Put more than one parameter in /boot.config
>Fix:
Duplicate the string before displaying it.
--- sys/boot/i386/boot2/boot2.c Tue Oct 3 18:00:22 2006
+++ sys/boot/i386/boot2/boot2.c Wed Oct 4 14:20:52 2006
@@ -252,10 +252,12 @@
fsread(ino, cmd, sizeof(cmd));
if (*cmd) {
+ char cmddup[512];
+ 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;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-i386
mailing list