Remove filtering on major device number. These are assigned randomly

these days so filtering on them makes no sense other than as a foot-shooting
device.
This commit is contained in:
Poul-Henning Kamp 2005-02-27 17:22:36 +00:00
parent 2dcb9ce484
commit 1964f79ab3
2 changed files with 2 additions and 13 deletions

View File

@ -146,8 +146,8 @@ Rules have two parts: the conditions and the actions.
The conditions determine which DEVFS nodes the rule matches
and the actions determine what should be done when a rule matches a node.
For example, a rule can be written that sets the GID to
.Dq Li games
for all devices with major number 53.
.Dq Li operator
for all devices of type tape.
If the first token of a rule specification is a single dash
.Pq Sq Fl ,
rules are read from the standard input and the rest of the specification
@ -157,9 +157,6 @@ The following conditions are recognized.
Conditions are ANDed together when matching a device;
if OR is desired, multiple rules can be written.
.Bl -tag -offset indent
.It Cm major Ar majdev
Matches any node with a major number equal to
.Ar majdev .
.It Cm path Ar pattern
Matches any node with a path that matches
.Ar pattern ,

View File

@ -357,12 +357,6 @@ rulespec_intok(struct devfs_rule *dr, int ac __unused, char **av,
warnx("pattern specified too long; truncated");
dr->dr_icond |= DRC_PATHPTRN;
av += 2;
} else if (strcmp(av[0], "major") == 0) {
if (av[1] == NULL)
errx(1, "expecting argument for major");
dr->dr_major = eatoi(av[1]);
dr->dr_icond |= DRC_MAJOR;
av += 2;
} else
break;
}
@ -438,8 +432,6 @@ rulespec_outfp(FILE *fp, struct devfs_rule *dr)
fprintf(fp, " type %s", is->s);
if (dr->dr_icond & DRC_PATHPTRN)
fprintf(fp, " path %s", dr->dr_pathptrn);
if (dr->dr_icond & DRC_MAJOR)
fprintf(fp, " major %d", dr->dr_major);
if (dr->dr_iacts & DRA_BACTS) {
if (dr->dr_bacts & DRB_HIDE)