Subject: kern/4085: Turn SCSIVERBOSE/PCIVERBOSE/EISAVERBOSE into defopt'ed option
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@but-b.or.jp>
List: netbsd-bugs
Date: 09/05/1997 15:36:39
>Number:         4085
>Category:       kern
>Synopsis:       Turn SCSIVERBOSE/PCIVERBOSE/EISAVERBOSE into defopt'ed option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Sep  4 23:50:01 1997
>Last-Modified:
>Originator:     enami tsugutomo
>Organization:
>Release:        NetBSD-current as of 1997 Sep 03.
>Environment:
System: NetBSD pavlov.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (PAVLOV) #318: Sun Aug 24 10:28:41 JST 1997 enami@pavlov.enami.ba2.so-net.or.jp:/b/netbsd/kernel/compile/PAVLOV i386


>Description:
	I want much more options declared by defopt.  First I converted
	these three options.

>How-To-Repeat:
	Look into the sources.

>Fix:
	Here is my fix, diff from src/sys/dev.  I put #include "opt_..."
	line at the beginning of all other include, since SCSIVERBOSE
	is used in scsiconf.h, and PCIVERBOSE is used conditional
	inclusion.   And to keep consistensy, EISAVERBOSE also put at
	beginning.

	On the other hand, with existing kernel source, almost are
	included at the end.  Probably some rule is needed and written
	in share/misc/style file, isn't it?

Index: scsipi/files.scsipi
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/scsipi/files.scsipi,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 files.scsipi
--- files.scsipi	1997/08/27 14:11:17	1.1.1.1
+++ files.scsipi	1997/09/04 05:47:48
@@ -4,6 +4,8 @@
 # Included by ports that need it.  Ports that use it must provide
 # their own "major" declarations for the appropriate devices.
 
+defopt	SCSIVERBOSE
+
 file	dev/scsipi/scsipiconf.c			scsi | atapi
 file	dev/scsipi/scsipi_base.c			scsi | atapi
 file	dev/scsipi/scsipi_ioctl.c			scsi | atapi
Index: scsipi/scsi_base.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/scsipi/scsi_base.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 scsi_base.c
--- scsi_base.c	1997/08/27 14:11:17	1.1.1.1
+++ scsi_base.c	1997/09/05 05:48:00
@@ -33,6 +33,8 @@
  * Originally written by Julian Elischer (julian@dialix.oz.au)
  */
 
+#include "opt_scsiverbose.h"
+
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
Index: scsipi/st.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/scsipi/st.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 st.c
--- st.c	1997/08/27 14:11:18	1.1.1.1
+++ st.c	1997/09/05 05:47:35
@@ -53,6 +53,8 @@
  * to be depending on whether we expect to retension or not.
  */
 
+#include "opt_scsiverbose.h"
+
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/systm.h>
Index: pci/files.pci
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/pci/files.pci,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 files.pci
--- files.pci	1997/08/30 13:31:50	1.1.1.8
+++ files.pci	1997/09/05 05:49:50
@@ -4,6 +4,8 @@
 # Included by ports that need it.  Requires that the SCSI files be
 # defined first.
 
+defopt	PCIVERBOSE
+
 device	pci {[dev = -1], [function = -1]}
 attach	pci at pcibus
 file	dev/pci/pci.c			pci needs-flag
Index: pci/pci_subr.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/pci/pci_subr.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 pci_subr.c
--- pci_subr.c	1997/03/20 13:29:03	1.1.1.4
+++ pci_subr.c	1997/09/05 05:49:35
@@ -34,6 +34,8 @@
  * PCI autoconfiguration support functions.
  */
 
+#include "opt_pciverbose.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/device.h>
Index: eisa/eisa.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/eisa/eisa.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 eisa.c
--- eisa.c	1997/06/07 23:02:44	1.1.1.4
+++ eisa.c	1997/09/05 05:50:48
@@ -38,6 +38,8 @@
  * living on it.
  */
 
+#include "opt_eisaverbose.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/device.h>
Index: eisa/files.eisa
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/dev/eisa/files.eisa,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 files.eisa
--- files.eisa	1997/07/21 13:19:16	1.1.1.5
+++ files.eisa	1997/09/05 05:50:15
@@ -4,6 +4,8 @@
 # Included by ports that need it.  Requires that the SCSI files be
 # defined first.
 
+defopt	EISAVERBOSE
+
 device	eisa {[slot = -1]}
 attach	eisa at eisabus
 file	dev/eisa/eisa.c			eisa	needs-flag
>Audit-Trail:
>Unformatted: