summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/coda/coda_fbsd.c2
-rw-r--r--sys/coda/coda_psdev.c2
-rw-r--r--sys/coda/coda_vfsops.c2
-rw-r--r--sys/conf/Makefile.alpha2
-rw-r--r--sys/conf/Makefile.amd642
-rw-r--r--sys/conf/Makefile.arm2
-rw-r--r--sys/conf/Makefile.i3862
-rw-r--r--sys/conf/Makefile.ia642
-rw-r--r--sys/conf/Makefile.pc982
-rw-r--r--sys/conf/Makefile.powerpc2
-rw-r--r--sys/conf/Makefile.sparc642
-rw-r--r--sys/conf/NOTES33
-rw-r--r--sys/conf/files14
-rw-r--r--sys/conf/files.pc984
-rw-r--r--sys/conf/options9
-rw-r--r--sys/conf/options.pc984
-rw-r--r--sys/fs/coda/coda_fbsd.c2
-rw-r--r--sys/fs/coda/coda_psdev.c2
-rw-r--r--sys/fs/coda/coda_vfsops.c2
-rw-r--r--sys/i386/conf/NOTES32
-rw-r--r--sys/i4b/driver/i4b_ing.c2
-rw-r--r--sys/i4b/driver/i4b_ipr.c2
-rw-r--r--sys/i4b/driver/i4b_isppp.c2
-rw-r--r--sys/i4b/driver/i4b_rbch.c2
-rw-r--r--sys/i4b/driver/i4b_tel.c2
-rw-r--r--sys/i4b/driver/i4b_trace.c2
-rw-r--r--sys/i4b/layer4/i4b_i4bdrv.c6
-rw-r--r--sys/i4b/layer4/i4b_l4.c7
-rw-r--r--sys/pc98/conf/GENERIC5
-rw-r--r--sys/pc98/pc98/atapi.c13
-rw-r--r--sys/pc98/pc98/wd.c6
-rw-r--r--usr.sbin/config/config.h8
-rw-r--r--usr.sbin/config/config.y14
-rw-r--r--usr.sbin/config/configvers.h2
-rw-r--r--usr.sbin/config/lang.l19
-rw-r--r--usr.sbin/config/mkheaders.c156
-rw-r--r--usr.sbin/config/mkmakefile.c18
37 files changed, 98 insertions, 292 deletions
diff --git a/sys/coda/coda_fbsd.c b/sys/coda/coda_fbsd.c
index d3feff0..8ea9826 100644
--- a/sys/coda/coda_fbsd.c
+++ b/sys/coda/coda_fbsd.c
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "vcoda.h"
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/coda/coda_psdev.c b/sys/coda/coda_psdev.c
index 03e408d..35eb725 100644
--- a/sys/coda/coda_psdev.c
+++ b/sys/coda/coda_psdev.c
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
extern int coda_nc_initialized; /* Set if cache has been initialized */
-#include <vcoda.h>
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/coda/coda_vfsops.c b/sys/coda/coda_vfsops.c
index 189ee92..04e739c 100644
--- a/sys/coda/coda_vfsops.c
+++ b/sys/coda/coda_vfsops.c
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <vcoda.h>
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha
index d17855d..b310d5d 100644
--- a/sys/conf/Makefile.alpha
+++ b/sys/conf/Makefile.alpha
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
.if !defined(S)
.if exists(./@/.)
diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64
index 0268761..9655247 100644
--- a/sys/conf/Makefile.amd64
+++ b/sys/conf/Makefile.amd64
@@ -18,7 +18,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm
index 998d296..dbbe7d6 100644
--- a/sys/conf/Makefile.arm
+++ b/sys/conf/Makefile.arm
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
# Temporary stuff while we're still embryonic
NO_MODULES?= yes
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 6259f69..dd02522 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.ia64 b/sys/conf/Makefile.ia64
index 82d79a8..b543fbc 100644
--- a/sys/conf/Makefile.ia64
+++ b/sys/conf/Makefile.ia64
@@ -19,7 +19,7 @@
GCC3= you bet
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
STD8X16FONT?= iso
diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98
index eb8fda0..161dbcc 100644
--- a/sys/conf/Makefile.pc98
+++ b/sys/conf/Makefile.pc98
@@ -19,7 +19,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
.if !defined(S)
.if exists(./@/.)
diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc
index 471ae7f..93c219c 100644
--- a/sys/conf/Makefile.powerpc
+++ b/sys/conf/Makefile.powerpc
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
# Temporary stuff while we're still embryonic
NO_MODULES?= yes
diff --git a/sys/conf/Makefile.sparc64 b/sys/conf/Makefile.sparc64
index a9e11e5..357bc0f 100644
--- a/sys/conf/Makefile.sparc64
+++ b/sys/conf/Makefile.sparc64
@@ -17,7 +17,7 @@
#
# Which version of config(8) is required.
-%VERSREQ= 500013
+%VERSREQ= 600000
STD8X16FONT?= iso
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 5eb1b49..f03555f 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -817,10 +817,11 @@ options NFS_DEBUG # Enable NFS Debugging
# Coda stuff:
options CODA #CODA filesystem.
-device vcoda 4 #coda minicache <-> venus comm.
+device vcoda #coda minicache <-> venus comm.
# Use the old Coda 5.x venus<->kernel interface instead of the new
# realms-aware 6.x protocol.
#options CODA_COMPAT_5
+options NVCODA=4
#
# Add support for the EXT2FS filesystem of Linux fame. Be a bit
@@ -1869,32 +1870,32 @@ device sound
# snd_vibes: S3 Sonicvibes PCI.
# snd_uaudio: USB audio.
-device "snd_ad1816"
-device "snd_als4000"
-#device "snd_au88x0"
+device snd_ad1816
+device snd_als4000
+#device snd_au88x0
device snd_cmi
-device "snd_cs4281"
+device snd_cs4281
device snd_csa
-device "snd_ds1"
-device "snd_emu10k1"
-device "snd_es137x"
+device snd_ds1
+device snd_emu10k1
+device snd_es137x
device snd_ess
-device "snd_fm801"
+device snd_fm801
device snd_gusc
device snd_ich
device snd_maestro
-device "snd_maestro3"
+device snd_maestro3
device snd_mss
device snd_neomagic
-device "snd_sb16"
-device "snd_sb8"
+device snd_sb16
+device snd_sb8
device snd_sbc
device snd_solo
-device "snd_t4dwave"
-device "snd_via8233"
-device "snd_via82c686"
+device snd_t4dwave
+device snd_via8233
+device snd_via82c686
device snd_vibes
-#device "snd_vortex1"
+#device snd_vortex1
device snd_uaudio
# For non-pnp sound cards:
diff --git a/sys/conf/files b/sys/conf/files
index 32aa116..0874c7a 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -82,7 +82,7 @@ cam/scsi/scsi_sa.c optional sa
cam/scsi/scsi_ses.c optional ses
cam/scsi/scsi_targ_bh.c optional targbh
cam/scsi/scsi_target.c optional targ
-coda/coda_fbsd.c count vcoda
+coda/coda_fbsd.c optional vcoda
coda/coda_namecache.c optional vcoda
coda/coda_psdev.c optional vcoda
coda/coda_subr.c optional vcoda
@@ -992,14 +992,14 @@ gnu/ext2fs/ext2_vnops.c optional ext2fs
#
# isdn4bsd device drivers
#
-i4b/driver/i4b_trace.c count i4btrc
-i4b/driver/i4b_rbch.c count i4brbch
-i4b/driver/i4b_tel.c count i4btel
-i4b/driver/i4b_ipr.c count i4bipr
+i4b/driver/i4b_trace.c optional i4btrc
+i4b/driver/i4b_rbch.c optional i4brbch
+i4b/driver/i4b_tel.c optional i4btel
+i4b/driver/i4b_ipr.c optional i4bipr
net/slcompress.c optional i4bipr
i4b/driver/i4b_ctl.c optional i4bctl
-i4b/driver/i4b_ing.c count i4bing
-i4b/driver/i4b_isppp.c count i4bisppp
+i4b/driver/i4b_ing.c optional i4bing
+i4b/driver/i4b_isppp.c optional i4bisppp
net/slcompress.c optional i4bisppp
#
# isdn4bsd CAPI driver
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index 634566a..66f02c4 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -347,8 +347,8 @@ pc98/pc98/scvtbpc98.c optional sc
pc98/pc98/sio.c optional sio
pc98/pc98/sio_cbus.c optional sio isa
pc98/pc98/syscons_pc98.c optional sc
-pc98/pc98/wd.c count wdc
-pc98/pc98/wd_cd.c count wcd wdc
+pc98/pc98/wd.c optional wdc
+pc98/pc98/wd_cd.c optional wcd wdc
pccard/mecia.c optional mecia card
pci/agp_ali.c optional agp
pci/agp_amd.c optional agp
diff --git a/sys/conf/options b/sys/conf/options
index 28c9e5c..9cbc540 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -60,6 +60,7 @@ ADAPTIVE_GIANT opt_adaptive_mutexes.h
NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
ALQ
CODA_COMPAT_5 opt_coda.h
+NVCODA opt_coda.h
COMPAT_43 opt_compat.h
COMPAT_FREEBSD4 opt_compat.h
COMPILING_LINT opt_global.h
@@ -679,3 +680,11 @@ DCONS_BUF_SIZE opt_dcons.h
DCONS_POLL_HZ opt_dcons.h
DCONS_FORCE_CONSOLE opt_dcons.h
DCONS_FORCE_GDB opt_dcons.h
+
+# Static unit counts
+NI4BTRC opt_i4b.h
+NI4BRBCH opt_i4b.h
+NI4BTEL opt_i4b.h
+NI4BIPR opt_i4b.h
+NI4BING opt_i4b.h
+NI4BISPPP opt_i4b.h
diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98
index e5354a9..7a147de 100644
--- a/sys/conf/options.pc98
+++ b/sys/conf/options.pc98
@@ -108,3 +108,7 @@ PC98 opt_global.h
DEV_APIC opt_apic.h
DEV_MECIA opt_mecia.h
DEV_NPX opt_npx.h
+DEV_WCD opt_wcd.h
+
+# Static unit counts
+NWDC opt_wdc.h
diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c
index d3feff0..8ea9826 100644
--- a/sys/fs/coda/coda_fbsd.c
+++ b/sys/fs/coda/coda_fbsd.c
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "vcoda.h"
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c
index 03e408d..35eb725 100644
--- a/sys/fs/coda/coda_psdev.c
+++ b/sys/fs/coda/coda_psdev.c
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
extern int coda_nc_initialized; /* Set if cache has been initialized */
-#include <vcoda.h>
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 189ee92..04e739c 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -43,7 +43,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <vcoda.h>
+#include "opt_coda.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index fd4a624..7f3cbee 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -471,7 +471,7 @@ device acpi_video
# for AGP r128 and radeon cards.
device mgadrm
-device "r128drm"
+device r128drm
device radeondrm
device sisdrm
device tdfxdrm
@@ -870,7 +870,7 @@ device ifpi
# ifpi2 driver for AVM Fritz!Card PCI version 2
#
# AVM Fritz!Card PCI version 2
-device "ifpi2"
+device ifpi2
#
#---------------------------------------------------------------------------
# iwic driver for Winbond W6692 chipset
@@ -900,34 +900,38 @@ hint.iavc.0.irq="5"
# ISDN Protocol Stack - mandatory for all hardware drivers
#
# Q.921 / layer 2 - i4b passive cards D channel handling
-device "i4bq921"
+device i4bq921
#
# Q.931 / layer 3 - i4b passive cards D channel handling
-device "i4bq931"
+device i4bq931
#
# layer 4 - i4b common passive and active card handling
-device "i4b"
+device i4b
#
#---------------------------------------------------------------------------
# ISDN devices - mandatory for all hardware drivers
#
# userland driver to do ISDN tracing (for passive cards only)
-device "i4btrc" 4
+device i4btrc
+options NI4BTRC=4
#
# userland driver to control the whole thing
-device "i4bctl"
+device i4bctl
#
#---------------------------------------------------------------------------
# ISDN devices - optional
#
# userland driver for access to raw B channel
-device "i4brbch" 4
+device i4brbch
+options NI4BRBCH=4
#
# userland driver for telephony
-device "i4btel" 2
+device i4btel
+options NI4BTEL=2
#
# network driver for IP over raw HDLC ISDN
-device "i4bipr" 4
+device i4bipr
+options NI4BIPR=4
# enable VJ header compression detection for ipr i/f
options IPR_VJ
# enable logging of the first n IP packets to isdnd (n=32 here)
@@ -935,13 +939,15 @@ options IPR_LOG=32
#
# network driver for sync PPP over ISDN; requires an equivalent
# number of sppp device to be configured
-device "i4bisppp" 4
+device i4bisppp
+options NI4BISPPP=4
#
# B-channel interface to the netgraph subsystem
-device "i4bing" 2
+device i4bing
+options NI4BING=2
#
# CAPI driver needed for active ISDN cards (see iavc driver above)
-device "i4bcapi"
+device i4bcapi
#
#---------------------------------------------------------------------------
diff --git a/sys/i4b/driver/i4b_ing.c b/sys/i4b/driver/i4b_ing.c
index e1024e1..e9e73a8 100644
--- a/sys/i4b/driver/i4b_ing.c
+++ b/sys/i4b/driver/i4b_ing.c
@@ -33,8 +33,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4bing.h"
-
#include "opt_i4b.h"
#include <sys/param.h>
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index cc087dc..5a61258 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -56,8 +56,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4bipr.h"
-
#include "opt_i4b.h"
#include <sys/param.h>
diff --git a/sys/i4b/driver/i4b_isppp.c b/sys/i4b/driver/i4b_isppp.c
index 3f374dc..3f7f56c 100644
--- a/sys/i4b/driver/i4b_isppp.c
+++ b/sys/i4b/driver/i4b_isppp.c
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4bisppp.h"
+#include "opt_i4b.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c
index f44dcaf..d34ccdd 100644
--- a/sys/i4b/driver/i4b_rbch.c
+++ b/sys/i4b/driver/i4b_rbch.c
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4brbch.h"
+#include "opt_i4b.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c
index c4fc0e3..5c3b37b 100644
--- a/sys/i4b/driver/i4b_tel.c
+++ b/sys/i4b/driver/i4b_tel.c
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4btel.h"
+#include "opt_i4b.h"
#undef I4BTELDEBUG
diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c
index e165d96..888e2b0 100644
--- a/sys/i4b/driver/i4b_trace.c
+++ b/sys/i4b/driver/i4b_trace.c
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4btrc.h"
+#include "opt_i4b.h"
#include <sys/param.h>
#include <sys/systm.h>
diff --git a/sys/i4b/layer4/i4b_i4bdrv.c b/sys/i4b/layer4/i4b_i4bdrv.c
index 671cba4..e80c944 100644
--- a/sys/i4b/layer4/i4b_i4bdrv.c
+++ b/sys/i4b/layer4/i4b_i4bdrv.c
@@ -33,8 +33,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4bipr.h"
-#include "i4btel.h"
+#include "opt_i4b.h"
#include <sys/param.h>
#include <sys/ioccom.h>
@@ -48,9 +47,6 @@ __FBSDID("$FreeBSD$");
#include <sys/selinfo.h>
#include <net/if.h>
-#include "i4bing.h"
-#include "i4bisppp.h"
-
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_cause.h>
diff --git a/sys/i4b/layer4/i4b_l4.c b/sys/i4b/layer4/i4b_l4.c
index 0b744f0..3acc6b0 100644
--- a/sys/i4b/layer4/i4b_l4.c
+++ b/sys/i4b/layer4/i4b_l4.c
@@ -33,18 +33,13 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "i4bipr.h"
+#include "opt_i4b.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
-#include "i4bing.h"
-#include "i4bisppp.h"
-#include "i4brbch.h"
-#include "i4btel.h"
-
#include <machine/i4b_debug.h>
#include <machine/i4b_ioctl.h>
#include <machine/i4b_cause.h>
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index 9541575..7dac427 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -89,10 +89,11 @@ device atapist # ATAPI tape drives
options ATA_STATIC_ID # Static device numbering
# IDE controller and disks
-#device wdc 1 # Needs COMPAT_OLDISA
+#device wdc # Needs COMPAT_OLDISA
+#options NWDC=1
# ATAPI devices on wdc
-#device wcd 1 # IDE CD-ROM
+#device wcd # IDE CD-ROM
# SCSI Controllers
device adv # Advansys SCSI adapters
diff --git a/sys/pc98/pc98/atapi.c b/sys/pc98/pc98/atapi.c
index d52fff5..b8c7817 100644
--- a/sys/pc98/pc98/atapi.c
+++ b/sys/pc98/pc98/atapi.c
@@ -101,11 +101,8 @@
*/
#undef DEBUG
-#include "wdc.h"
-
-#include "wcd.h"
-
-#if NWDC > 0
+#include "opt_wcd.h"
+#include "opt_wdc.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,14 +245,14 @@ int atapi_attach (int ctlr, int unit, int port)
break;
case AT_TYPE_DIRECT: /* direct-access */
-#if NWCD > 0
+#ifdef DEV_WCD
/* FALLTHROUGH */
#else
printf ("wdc%d: ATAPI Floppies not configured\n", ctlr);
break;
#endif
case AT_TYPE_CDROM: /* CD-ROM device */
-#if NWCD > 0
+#ifdef DEV_WCD
/* ATAPI CD-ROM & CD-R/RW drives */
if (acdattach (ata, unit, ap, ata->debug) < 0)
break;
@@ -966,5 +963,3 @@ struct atapires atapi_request_immediate (struct atapi *ata, int unit,
}
return (ac->result);
}
-
-#endif /* NWDC */
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index 6e36694..9e096b7 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -48,12 +48,10 @@
* driver entries for polled reinit and polled write).
*/
-#include "wdc.h"
+#include "opt_wdc.h"
#undef NWD
#define NWD (NWDC * 4) /* 4 drives per wdc on PC98 */
-#if NWDC > 0
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -2068,5 +2066,3 @@ wdwait(struct softc *du, u_char bits_wanted, int timeout)
} while (--timeout != 0);
return (-1);
}
-
-#endif /* NWDC > 0 */
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h
index 691aa3a..f3d292d 100644
--- a/usr.sbin/config/config.h
+++ b/usr.sbin/config/config.h
@@ -41,7 +41,7 @@
struct file_list {
STAILQ_ENTRY(file_list) f_next;
char *f_fn; /* the name */
- int f_type; /* type or count */
+ int f_type; /* type */
u_char f_flags; /* see below */
char *f_compilewith; /* special make rule if present */
char *f_depends; /* additional dependancies */
@@ -72,14 +72,12 @@ struct files_name {
#define NO_IMPLCT_RULE 1
#define NO_OBJ 2
#define BEFORE_DEPEND 4
-#define NEED_COUNT 8
-#define ISDUP 16
-#define NOWERROR 32
+#define ISDUP 8
+#define NOWERROR 16
struct device {
int d_done; /* processed */
char *d_name; /* name of device (e.g. rk11) */
- int d_count; /* device count */
#define UNKNOWN -2 /* -2 means not set yet */
STAILQ_ENTRY(device) d_next; /* Next one in list */
};
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index d16982a..47b2568 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -250,16 +250,7 @@ Device_spec:
= {
newopt(&opt, devopt($2), ns("1"));
/* and the device part */
- newdev($2, UNKNOWN);
- } |
- DEVICE Dev NUMBER
- = {
- newopt(&opt, devopt($2), ns("1"));
- /* and the device part */
- newdev($2, $3);
- if ($3 == 0)
- errx(1, "%s:%d: devices with zero units are not "
- "likely to be correct", yyfile, yyline);
+ newdev($2);
} |
NODEVICE Dev
= {
@@ -298,14 +289,13 @@ newfile(char *name)
* add a device to the list of devices
*/
static void
-newdev(char *name, int count)
+newdev(char *name)
{
struct device *np;
np = (struct device *) malloc(sizeof *np);
memset(np, 0, sizeof(*np));
np->d_name = name;
- np->d_count = count;
STAILQ_INSERT_TAIL(&dtab, np, d_next);
}
diff --git a/usr.sbin/config/configvers.h b/usr.sbin/config/configvers.h
index 4e6ccb9..1c66e66 100644
--- a/usr.sbin/config/configvers.h
+++ b/usr.sbin/config/configvers.h
@@ -8,4 +8,4 @@
*
* $FreeBSD$
*/
-#define CONFIGVERS 500013
+#define CONFIGVERS 600000
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index d9e70ba..a15dfe3 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -89,11 +89,10 @@ unsigned int hex(const char *);
int yyerror(const char *);
%}
-WORD [A-Za-z_][-A-Za-z_]*
ID [A-Za-z_][-A-Za-z_0-9]*
-%START NONUM TOEOL
+%START TOEOL
%%
-<NONUM>{WORD} {
+{ID} {
int i;
BEGIN 0;
@@ -104,20 +103,6 @@ ID [A-Za-z_][-A-Za-z_0-9]*
}
return i;
}
-<INITIAL>{WORD}/[0-9]* {
- int i;
-
- if ((i = kw_lookup(yytext)) == -1)
- REJECT;
- if (i == DEVICE || i == NODEVICE)
- BEGIN NONUM;
- return i;
- }
-<INITIAL>{ID} {
- BEGIN 0;
- yylval.str = strdup(yytext);
- return ID;
- }
\\\"[^"]+\\\" {
BEGIN 0;
yytext[yyleng-2] = '"';
diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c
index 2df6a92..9babe78 100644
--- a/usr.sbin/config/mkheaders.c
+++ b/usr.sbin/config/mkheaders.c
@@ -47,10 +47,6 @@ static const char rcsid[] =
#include "config.h"
#include "y.tab.h"
-static int do_header(char *, int);
-static char *toheader(char *);
-static char *tomacro(char *);
-
void
headers(void)
{
@@ -69,8 +65,6 @@ headers(void)
dp->d_done |= DEVDONE;
}
}
- if (fl->f_flags & NEED_COUNT)
- errors += do_header(fl->f_needs, match);
}
}
STAILQ_FOREACH(dp, &dtab, d_next) {
@@ -79,157 +73,7 @@ headers(void)
dp->d_name);
errors++;
}
- if (dp->d_count == UNKNOWN)
- continue;
- match = 0;
- STAILQ_FOREACH(fl, &ftab, f_next) {
- if (fl->f_needs == 0)
- continue;
- if ((fl->f_flags & NEED_COUNT) == 0)
- continue;
- if (eq(dp->d_name, fl->f_needs)) {
- match++;
- break;
- }
- }
- if (match == 0) {
- warnx("Error: device \"%s\" does not take a count",
- dp->d_name);
- errors++;
- }
}
if (errors)
errx(1, "%d errors", errors);
}
-
-static int
-do_header(char *dev, int match)
-{
- char *file, *name, *inw;
- struct file_list *fl, *tflp;
- struct file_list_head fl_head;
- struct device *dp;
- FILE *inf, *outf;
- int inc, oldcount;
- int count, hicount;
- int errors;
-
- /*
- * After this loop, "count" will be the actual number of units,
- * and "hicount" will be the highest unit declared. do_header()
- * must use this higher of these values.
- */
- errors = 0;
- hicount = count = 0;
- STAILQ_FOREACH(dp, &dtab, d_next) {
- if (eq(dp->d_name, dev)) {
- if (dp->d_count == UNKNOWN) {
- warnx("Device \"%s\" requires a count", dev);
- return 1;
- }
- count = dp->d_count;
- break;
- }
- }
- file = toheader(dev);
- name = tomacro(dev);
- if (match)
- fprintf(stderr,
- "FYI: static unit limits for %s are set: %s=%d\n",
- dev, name, count);
- remember(file);
- inf = fopen(file, "r");
- oldcount = -1;
- if (inf == 0) {
- outf = fopen(file, "w");
- if (outf == 0)
- err(1, "%s", file);
- fprintf(outf, "#ifndef BURN_BRIDGES\n");
- fprintf(outf, "#define %s %d\n", name, count);
- fprintf(outf, "#endif\n");
- (void) fclose(outf);
- return 0;
- }
- STAILQ_INIT(&fl_head);
- for (;;) {
- char *cp;
- if ((inw = get_word(inf)) == 0 || inw == (char *)EOF)
- break;
- if ((inw = get_word(inf)) == 0 || inw == (char *)EOF)
- break;
- inw = ns(inw);
- cp = get_word(inf);
- if (cp == 0 || cp == (char *)EOF)
- break;
- inc = atoi(cp);
- if (eq(inw, name)) {
- oldcount = inc;
- inc = count;
- }
- cp = get_word(inf);
- if (cp == (char *)EOF)
- break;
- fl = (struct file_list *) malloc(sizeof *fl);
- bzero(fl, sizeof(*fl));
- fl->f_fn = inw; /* malloced */
- fl->f_type = inc;
- STAILQ_INSERT_HEAD(&fl_head, fl, f_next);
- }
- (void) fclose(inf);
- if (count == oldcount) {
- for (fl = STAILQ_FIRST(&fl_head); fl != NULL; fl = tflp) {
- tflp = STAILQ_NEXT(fl, f_next);
- free(fl->f_fn);
- free(fl);
- }
- return 0;
- }
- if (oldcount == -1) {
- fl = (struct file_list *) malloc(sizeof *fl);
- bzero(fl, sizeof(*fl));
- fl->f_fn = ns(name);
- fl->f_type = count;
- STAILQ_INSERT_HEAD(&fl_head, fl, f_next);
- }
- outf = fopen(file, "w");
- if (outf == 0)
- err(1, "%s", file);
- for (fl = STAILQ_FIRST(&fl_head); fl != NULL; fl = tflp) {
- fprintf(outf,
- "#define %s %u\n", fl->f_fn, count ? fl->f_type : 0);
- tflp = STAILQ_NEXT(fl, f_next);
- free(fl->f_fn);
- free(fl);
- }
- (void) fclose(outf);
- return 0;
-}
-
-/*
- * convert a dev name to a .h file name
- */
-static char *
-toheader(char *dev)
-{
- static char hbuf[MAXPATHLEN];
-
- snprintf(hbuf, sizeof(hbuf), "%s.h", path(dev));
- return (hbuf);
-}
-
-/*
- * convert a dev name to a macro name
- */
-static char *
-tomacro(char *dev)
-{
- static char mbuf[20];
- char *cp;
-
- cp = mbuf;
- *cp++ = 'N';
- while (*dev)
- *cp++ = islower(*dev) ? toupper(*dev++) : *dev++;
- *cp++ = 0;
- return (mbuf);
-}
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index a95bee2..d4b2466 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -298,14 +298,14 @@ read_file(char *fname)
struct opt *op;
char *wd, *this, *needs, *compilewith, *depends, *clean, *warning;
int nreqs, isdup, std, filetype,
- imp_rule, no_obj, needcount, before_depend, mandatory, nowerror;
+ imp_rule, no_obj, before_depend, mandatory, nowerror;
fp = fopen(fname, "r");
if (fp == 0)
err(1, "%s", fname);
next:
/*
- * filename [ standard | mandatory | optional | count ]
+ * filename [ standard | mandatory | optional ]
* [ dev* | profiling-routine ] [ no-obj ]
* [ compile-with "compile rule" [no-implicit-rule] ]
* [ dependency "dependency-list"] [ before-depend ]
@@ -345,7 +345,6 @@ next:
std = mandatory = 0;
imp_rule = 0;
no_obj = 0;
- needcount = 0;
before_depend = 0;
nowerror = 0;
filetype = NORMAL;
@@ -358,10 +357,8 @@ next:
*/
} else if (eq(wd, "mandatory")) {
mandatory = 1;
- } else if (eq(wd, "count")) {
- needcount = 1;
} else if (!eq(wd, "optional")) {
- printf("%s: %s must be count, optional, mandatory or standard\n",
+ printf("%s: %s must be optional, mandatory or standard\n",
fname, this);
exit(1);
}
@@ -451,11 +448,8 @@ nextparam:
if (isdup)
goto invis;
STAILQ_FOREACH(dp, &dtab, d_next)
- if (eq(dp->d_name, wd)) {
- if (std && dp->d_count <= 0)
- dp->d_count = 1;
+ if (eq(dp->d_name, wd))
goto nextparam;
- }
if (mandatory) {
printf("%s: mandatory device \"%s\" not found\n",
fname, wd);
@@ -483,8 +477,6 @@ invis:
tp->f_type = INVISIBLE;
tp->f_needs = needs;
tp->f_flags |= isdup;
- if (needcount)
- tp->f_flags |= NEED_COUNT;
tp->f_compilewith = compilewith;
tp->f_depends = depends;
tp->f_clean = clean;
@@ -516,8 +508,6 @@ doneparam:
tp->f_flags |= NO_OBJ;
if (before_depend)
tp->f_flags |= BEFORE_DEPEND;
- if (needcount)
- tp->f_flags |= NEED_COUNT;
if (nowerror)
tp->f_flags |= NOWERROR;
tp->f_needs = needs;
OpenPOWER on IntegriCloud