Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 09:11:51 GMT
From:      "G. Paul Ziemba" <p-fbsd-bugs@ziemba.us>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/142960: [patch] sysinstall comparison of cdrom.inf CD_VERSION against "any" is broken
Message-ID:  <201001190911.o0J9Bpre037350@www.freebsd.org>
Resent-Message-ID: <201001190920.o0J9K5HJ034642@freefall.freebsd.org>

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

>Number:         142960
>Category:       bin
>Synopsis:       [patch] sysinstall comparison of cdrom.inf CD_VERSION against "any" is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 19 09:20:05 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     G. Paul Ziemba
>Release:        8.0
>Organization:
>Environment:
FreeBSD gw2.ziemba.us 8.0-STABLE FreeBSD 8.0-STABLE #3: Sat Jan  9 08:56:12 PST 2010     root@gw2.ziemba.us:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
setting CDROM_VERSION=any in cdrom.inf should silence sysinstall's complaints about mismatched versions, yet it doesn't. The problem is an incorrect use of variable_cmp() where strcmp should be:

--- cdrom.c.orig        2009-08-03 01:13:06.000000000 -0700
+++ cdrom.c     2010-01-19 01:05:33.000000000 -0800
@@ -142,7 +142,7 @@
        else {
            if (variable_cmp(VAR_RELNAME, cp) &&
                variable_cmp(VAR_RELNAME, "any") &&
-               variable_cmp(cp, "any") &&
+               strcmp(cp, "any") &&
                !bogusCDOK) {
                msgConfirm("Warning: The version of the FreeBSD disc currently in the drive\n"
                           "(%s) does not match the version of the boot floppy\n"

>How-To-Repeat:
Make cdrom with install.cfg and cdrom.inf. Contents of cdrom.inf are:

CD_VERSION=any
CD_MACHINE_ARCH=any

Run sysinstall and attempt to load configuration file from CD. Sysinstall complains about version mismatch.
>Fix:
Change variable_cmp to strcmp in the line indicated in problem description.

>Release-Note:
>Audit-Trail:
>Unformatted:



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