Subject: port-newsmips/10136: variable "booted_device" must be exported
To: None <gnats-bugs@gnats.netbsd.org>
From: None <h-masuda@ootani.nagata.kobe.jp>
List: netbsd-bugs
Date: 05/17/2000 00:12:10
>Number:         10136
>Category:       port-newsmips
>Synopsis:       variable "booted_device" must be exported
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-newsmips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 17 00:13:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     MASUDA Hideo
>Release:        NetBSD-current source 2000/05/16 by rsync+cvs
>Organization:
	Ootani, Nagata, Kobe, JAPAN
>Environment:
System: NetBSD baradagi.ootani.nagata.kobe.jp 1.4Y NetBSD 1.4Y (BARADAGI) #7: Wed May 17 13:54:11 JST 2000 h-masuda@baradagi.ootani.nagata.kobe.jp:/usr/syssrc/sys/arch/newsmips/compile/BARADAGI newsmips

>Description:
	The variable "booted_device" is refered by "rf_buildroothack()" in
	sys/dev/raidframe/rf_netbsdkintf.c.
	So this variable must be exported.
>How-To-Repeat:
	enable "pseudo-device raid", config and make kernel
>Fix:
	"booted_device" in sys/arch/newsmips/newsmips/autoconf.c is
	private variable of cpu_rootconf() function.
	This will be fixed by exporting.
	Quick patch as following:

*** autoconf.c-dist	Thu Dec 23 07:34:32 1999
--- autoconf.c	Wed May 17 08:46:36 2000
***************
*** 114,123 ****
  	_splnone();	/* enable all source forcing SOFT_INTs cleared */
  }
  
  void
  cpu_rootconf()
  {
- 	struct device *booted_device;
  	int booted_partition;
  
  	findroot(&booted_device, &booted_partition);
--- 114,123 ----
  	_splnone();	/* enable all source forcing SOFT_INTs cleared */
  }
  
+ struct device *booted_device;
  void
  cpu_rootconf()
  {
  	int booted_partition;
  
  	findroot(&booted_device, &booted_partition);
>Release-Note:
>Audit-Trail:
>Unformatted: