From adrian@thneed.ubergeeks.com  Sat Feb  6 15:14:41 1999
Received: from thneed.ubergeeks.com (thneed.ubergeeks.com [206.205.41.245])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA04766
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 6 Feb 1999 15:14:40 -0800 (PST)
          (envelope-from adrian@thneed.ubergeeks.com)
Received: (from adrian@localhost)
	by thneed.ubergeeks.com (8.9.2/8.9.1) id SAA01829;
	Sat, 6 Feb 1999 18:17:02 -0500 (EST)
	(envelope-from adrian)
Message-Id: <199902062317.SAA01829@thneed.ubergeeks.com>
Date: Sat, 6 Feb 1999 18:17:02 -0500 (EST)
From: adrian@ubegeeks.com
Reply-To: adrian@ubegeeks.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: patch to pnp.c
X-Send-Pr-Version: 3.2

>Number:         9934
>Category:       kern
>Synopsis:       a hard coded string is incorrectly passed to pnp_readconf().
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb  6 15:20:00 PST 1999
>Closed-Date:    Sun Feb 7 04:12:49 PST 1999
>Last-Modified:  Sun Feb  7 04:14:01 PST 1999
>Originator:     Adrian Filipi-Martin
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
Ubergeeks Consulting
>Environment:

	cvsup'd as of 2/4/99.

>Description:

	The passing of '"fname"' as an argument to pnp_readconf() in the
	pnp_reload() function is very suspect given that 'fname' is a string
	argument to the function.

	This is in file /sys/boot/common/pnp.c.

>How-To-Repeat:

	

>Fix:
	
	Apply attached diff.

--- pnp.c.orig	Mon Jan 11 01:41:32 1999
+++ pnp.c	Sat Feb  6 18:09:02 1999
@@ -105,7 +105,7 @@
 	    pnp_readconf("/boot/pnpdata.local");
 	    pnp_readconf("/boot/pnpdata");
 	} else {
-	    if (pnp_readconf("fname")) {
+	    if (pnp_readconf(fname)) {
 		sprintf(command_errbuf, "can't read PnP information from '%s'", fname);
 		return(CMD_ERROR);
 	    }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dcs 
State-Changed-When: Sun Feb 7 04:12:49 PST 1999 
State-Changed-Why:  
Code in question is #if'ed out, and the variable isn't even declared. Fix 
applied, though, so an error is returned whenever the code is activated again. 
Thanks. 
>Unformatted:
