summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-11-09 07:20:22 +0000
committerpeter <peter@FreeBSD.org>1999-11-09 07:20:22 +0000
commitd21ff337ef6afcb755ed17f6ff18b87e1aae70b9 (patch)
tree6fbb16f3111ebb24e8552e3d95f48c9a77119882 /usr.sbin/config
parentd4a804e4d3d89846a9fbb9ea620f73342535bd25 (diff)
downloadFreeBSD-src-d21ff337ef6afcb755ed17f6ff18b87e1aae70b9.zip
FreeBSD-src-d21ff337ef6afcb755ed17f6ff18b87e1aae70b9.tar.gz
Re-support "tape" as an alias for device and clean up a bit more cruft
left over from the original system (d_dk was for preassigned iostat unit numbers for disks)
Diffstat (limited to 'usr.sbin/config')
-rw-r--r--usr.sbin/config/config.h1
-rw-r--r--usr.sbin/config/config.y13
-rw-r--r--usr.sbin/config/lang.l3
3 files changed, 13 insertions, 4 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h
index 5b7eef7..6b153a5 100644
--- a/usr.sbin/config/config.h
+++ b/usr.sbin/config/config.h
@@ -83,7 +83,6 @@ struct device {
int d_count; /* pseudo-device count */
#define QUES -1 /* -1 means '?' */
#define UNKNOWN -2 /* -2 means not set yet */
- 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 */
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index 5c6d1da..2217b59 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -32,6 +32,7 @@
%token PORT
%token PSEUDO_DEVICE
%token SEMICOLON
+%token TAPE
%token TARGET
%token TTY
%token UNIT
@@ -309,7 +310,15 @@ Device_spec:
DEVICE Dev_name Dev_info
= { cur.d_type = DEVICE; } |
DISK Dev_name Dev_info
- = { cur.d_dk = 1; cur.d_type = DEVICE; } |
+ = {
+ warnx("line %d: Obsolete keyword 'disk' found - use 'device'", yyline);
+ cur.d_type = DEVICE;
+ } |
+ TAPE Dev_name Dev_info
+ = {
+ warnx("line %d: Obsolete keyword 'tape' found - use 'device'", yyline);
+ cur.d_type = DEVICE;
+ } |
CONTROLLER Dev_name Dev_info
= { cur.d_type = CONTROLLER; } |
PSEUDO_DEVICE Init_dev Dev
@@ -536,7 +545,7 @@ init_dev(dp)
dp->d_conn = 0;
dp->d_conflicts = 0;
dp->d_disabled = 0;
- dp->d_flags = dp->d_dk = 0;
+ dp->d_flags = 0;
dp->d_slave = dp->d_lun = dp->d_target = dp->d_drive = dp->d_unit = \
dp->d_count = UNKNOWN;
dp->d_port = (char *)0;
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index 16c27ba..3a512a6 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -74,6 +74,7 @@ struct kt {
{ "options", OPTIONS },
{ "port", PORT },
{ "pseudo-device",PSEUDO_DEVICE },
+ { "tape", TAPE },
{ "target", TARGET },
{ "unit", UNIT },
{ 0, 0 },
@@ -105,7 +106,7 @@ ID [A-Za-z_][-A-Za-z_0-9]*
if ((i = kw_lookup(yytext)) == -1)
REJECT;
- if (i == CONTROLLER || i == DEVICE || i == DISK ||
+ if (i == CONTROLLER || i == DEVICE || i == DISK || i == TAPE ||
i == PSEUDO_DEVICE || i == AT)
BEGIN NONUM;
return i;
OpenPOWER on IntegriCloud