Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 2006 14:30:30 +0200
From:      Alexandre Belloni <alexandre.belloni@netasq.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/103972: [boot] boot loader doesn't display right /boot.config parameters
Message-ID:  <20061004123030.GA6847@netasq.com>
Resent-Message-ID: <200610041240.k94CeCRB085321@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061004123030.GA6847>