Subject: port-sparc/12916: xy.c fails to compile if __HAVE_OLD_DISKLABEL is not defined
To: None <gnats-bugs@gnats.netbsd.org>
From: None <blymn@baesystems.com.au>
List: netbsd-bugs
Date: 05/12/2001 17:02:13
>Number:         12916
>Category:       port-sparc
>Synopsis:       xy.c fails to compile if __HAVE_OLD_DISKLABEL is not defined
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 12 00:31:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Brett Lymn (Master of the Siren)
>Release:        NetBSD-1.5.1_BETA2
>Organization:
Brett Lymn
>Environment:
	sparc SS20, NetBSD-1.5.1_BETA
Architecture: sparc
Machine: sparc
>Description:
	There is a variable used in the xyioctl function that is surrounded
by an #ifdef __HAVE_OLD_DISKLABEL.  If this ifdef is not true then 
an undefined variable error results (lp is no longer defined).  I checked a
rather dated version of the source tree and this bug was there too, I suspect
that a defopt has recently changed and that has brought this bug to light.

>How-To-Repeat:
	Ensure __HAVE_OLD_DISKLABEL is not defined and compile a kernel.
>Fix:
	Apply this patch to /usr/src/sys/dev/vme/xy.c:

Index: xy.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/vme/xy.c,v
retrieving revision 1.25.2.3
diff -r1.25.2.3 xy.c
913a914
>       struct disklabel *lp;
915c916
<       struct disklabel newlabel, *lp;
---
>       struct disklabel newlabel;

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