summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-04-13 19:57:38 +0000
committerbde <bde@FreeBSD.org>1996-04-13 19:57:38 +0000
commit6c70f295f50a3cb373c99006d3713172afa2476d (patch)
treea94df24732e592e1bd1506501bebf77087a5868a /usr.sbin/config
parentece7fb1dfd55edc729ac540bb7137d178e809786 (diff)
downloadFreeBSD-src-6c70f295f50a3cb373c99006d3713172afa2476d.zip
FreeBSD-src-6c70f295f50a3cb373c99006d3713172afa2476d.tar.gz
Implemented a new keyword `disable'. This should be useful for controlling
dangerous drivers in GENERIC. Removed non-comments on #endifs in config.y. Improved output formatting in mkioconf.c.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.h1
-rw-r--r--usr.sbin/config/config.y4
-rw-r--r--usr.sbin/config/lang.l17
-rw-r--r--usr.sbin/config/mkioconf.c9
4 files changed, 20 insertions, 11 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h
index 65c9b66..08aefef 100644
--- a/usr.sbin/config/config.h
+++ b/usr.sbin/config/config.h
@@ -122,6 +122,7 @@ struct device {
int d_dk; /* if init 1 set to number for iostat */
int d_flags; /* flags for device init */
int d_conflicts; /* I'm allowed to conflict */
+ int d_disabled; /* nonzero to skip probe/attach */
char *d_port; /* io port base manifest constant */
int d_portn; /* io port base (if number not manifest) */
char *d_mask; /* interrupt mask */
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index 78d8bf4..7658111 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -19,6 +19,7 @@
%token CPU
%token CSR
%token DEVICE
+%token DISABLE
%token DISK
%token DRIVE
%token DRQ
@@ -633,6 +634,8 @@ Info:
= { cur.d_mask = "net"; } |
FLAGS NUMBER
= { cur.d_flags = $2; } |
+ DISABLE
+ = { cur.d_disabled = 1; } |
CONFLICTS
= { cur.d_conflicts = 1; };
@@ -917,6 +920,7 @@ init_dev(dp)
dp->d_type = DEVICE;
dp->d_conn = 0;
dp->d_conflicts = 0;
+ dp->d_disabled = 0;
dp->d_vec = 0;
dp->d_addr = dp->d_flags = dp->d_dk = 0;
dp->d_pri = -1;
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index 3d80f5d..3f4f544 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -57,17 +57,20 @@ struct kt {
{ "bio", BIO },
{ "bus", BUS },
{ "conflicts", CONFLICTS },
-#endif MACHINE_I386
+#endif
{ "config", CONFIG },
{ "controller", CONTROLLER },
{ "cpu", CPU },
{ "csr", CSR },
{ "device", DEVICE },
+#if MACHINE_I386
+ { "disable", DISABLE },
+#endif
{ "disk", DISK },
{ "drive", DRIVE },
-#if MACHINE_I386
+#if MACHINE_I386
{ "drq", DRQ },
-#endif MACHINE_I386
+#endif
{ "dumps", DUMPS },
{ "flags", FLAGS },
{ "ident", IDENT },
@@ -76,7 +79,7 @@ struct kt {
{ "iomem", IOMEM },
{ "iosiz", IOSIZ },
{ "irq", IRQ },
-#endif MACHINE_I386
+#endif
{ "machine", MACHINE },
{ "major", MAJOR },
{ "makeoptions", MAKEOPTIONS },
@@ -85,14 +88,14 @@ struct kt {
{ "minor", MINOR },
#if MACHINE_I386
{ "net", NET },
-#endif MACHINE_I386
+#endif
{ "nexus", NEXUS },
{ "none", NONE },
{ "on", ON },
{ "options", OPTIONS },
#if MACHINE_I386
{ "port", PORT },
-#endif MACHINE_I386
+#endif
{ "priority", PRIORITY },
{ "pseudo-device",PSEUDO_DEVICE },
{ "root", ROOT },
@@ -107,7 +110,7 @@ struct kt {
{ "target", TARGET },
#if MACHINE_I386
{ "tty", TTY },
-#endif MACHINE_I386
+#endif
{ "trace", TRACE },
{ "unit", UNIT },
{ "vector", VECTOR },
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index 39a0819..44fc260 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -722,10 +722,11 @@ isa_biotab(fp, table)
continue;
fprintf(fp, "{ -1, &%3sdriver, %8s,",
mp->d_name, mp->d_port);
- fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %2d, 0x%04X, %2d, 0, 0, 0, 1, %2d, 0 },\n",
+ fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %3d, 0x%04X, %5d, 0, 0, 0, %6d, %8d, 0 },\n",
sirq(mp->d_irq), mp->d_drq, mp->d_maddr,
mp->d_msize, shandler(mp), dp->d_unit,
- dp->d_flags, dp->d_drive, dp->d_conflicts);
+ dp->d_flags, dp->d_drive, !dp->d_disabled,
+ dp->d_conflicts);
}
fprintf(fp, "0\n};\n");
}
@@ -758,10 +759,10 @@ isa_devtab(fp, table, dev_idp)
fprintf(fp, " %8s,", dp->d_port);
else
fprintf(fp, " 0x%04x,", dp->d_portn);
- fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %2d, 0x%04X, 0, 0, 0, 0, 1, %2d, 0 },\n",
+ fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %3d, 0x%04X, 0, 0, 0, 0, %6d, %8d, 0 },\n",
sirq(dp->d_irq), dp->d_drq, dp->d_maddr,
dp->d_msize, shandler(dp), dp->d_unit,
- dp->d_flags, dp->d_conflicts);
+ dp->d_flags, !dp->d_disabled, dp->d_conflicts);
}
fprintf(fp, "0\n};\n");
}
OpenPOWER on IntegriCloud