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)
This commit is contained in:
Peter Wemm 1999-11-09 07:20:22 +00:00
parent 2c1ebd063c
commit 6c54a82eb6
3 changed files with 13 additions and 4 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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;