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:
parent
2c1ebd063c
commit
6c54a82eb6
|
@ -83,7 +83,6 @@ struct device {
|
||||||
int d_count; /* pseudo-device count */
|
int d_count; /* pseudo-device count */
|
||||||
#define QUES -1 /* -1 means '?' */
|
#define QUES -1 /* -1 means '?' */
|
||||||
#define UNKNOWN -2 /* -2 means not set yet */
|
#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_flags; /* flags for device init */
|
||||||
int d_conflicts; /* I'm allowed to conflict */
|
int d_conflicts; /* I'm allowed to conflict */
|
||||||
int d_disabled; /* nonzero to skip probe/attach */
|
int d_disabled; /* nonzero to skip probe/attach */
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
%token PORT
|
%token PORT
|
||||||
%token PSEUDO_DEVICE
|
%token PSEUDO_DEVICE
|
||||||
%token SEMICOLON
|
%token SEMICOLON
|
||||||
|
%token TAPE
|
||||||
%token TARGET
|
%token TARGET
|
||||||
%token TTY
|
%token TTY
|
||||||
%token UNIT
|
%token UNIT
|
||||||
|
@ -309,7 +310,15 @@ Device_spec:
|
||||||
DEVICE Dev_name Dev_info
|
DEVICE Dev_name Dev_info
|
||||||
= { cur.d_type = DEVICE; } |
|
= { cur.d_type = DEVICE; } |
|
||||||
DISK Dev_name Dev_info
|
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
|
CONTROLLER Dev_name Dev_info
|
||||||
= { cur.d_type = CONTROLLER; } |
|
= { cur.d_type = CONTROLLER; } |
|
||||||
PSEUDO_DEVICE Init_dev Dev
|
PSEUDO_DEVICE Init_dev Dev
|
||||||
|
@ -536,7 +545,7 @@ init_dev(dp)
|
||||||
dp->d_conn = 0;
|
dp->d_conn = 0;
|
||||||
dp->d_conflicts = 0;
|
dp->d_conflicts = 0;
|
||||||
dp->d_disabled = 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_slave = dp->d_lun = dp->d_target = dp->d_drive = dp->d_unit = \
|
||||||
dp->d_count = UNKNOWN;
|
dp->d_count = UNKNOWN;
|
||||||
dp->d_port = (char *)0;
|
dp->d_port = (char *)0;
|
||||||
|
|
|
@ -74,6 +74,7 @@ struct kt {
|
||||||
{ "options", OPTIONS },
|
{ "options", OPTIONS },
|
||||||
{ "port", PORT },
|
{ "port", PORT },
|
||||||
{ "pseudo-device",PSEUDO_DEVICE },
|
{ "pseudo-device",PSEUDO_DEVICE },
|
||||||
|
{ "tape", TAPE },
|
||||||
{ "target", TARGET },
|
{ "target", TARGET },
|
||||||
{ "unit", UNIT },
|
{ "unit", UNIT },
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
|
@ -105,7 +106,7 @@ ID [A-Za-z_][-A-Za-z_0-9]*
|
||||||
|
|
||||||
if ((i = kw_lookup(yytext)) == -1)
|
if ((i = kw_lookup(yytext)) == -1)
|
||||||
REJECT;
|
REJECT;
|
||||||
if (i == CONTROLLER || i == DEVICE || i == DISK ||
|
if (i == CONTROLLER || i == DEVICE || i == DISK || i == TAPE ||
|
||||||
i == PSEUDO_DEVICE || i == AT)
|
i == PSEUDO_DEVICE || i == AT)
|
||||||
BEGIN NONUM;
|
BEGIN NONUM;
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in New Issue