From 537769f6992aad9ba96045b70cc1e5995b8b245e Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 27 Feb 2005 17:22:36 +0000 Subject: 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. --- sbin/devfs/devfs.8 | 7 ++----- sbin/devfs/rule.c | 8 -------- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'sbin/devfs') diff --git a/sbin/devfs/devfs.8 b/sbin/devfs/devfs.8 index 80facf7..ef5ac2f 100644 --- a/sbin/devfs/devfs.8 +++ b/sbin/devfs/devfs.8 @@ -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 , diff --git a/sbin/devfs/rule.c b/sbin/devfs/rule.c index d6b6ea3..e57f6de 100644 --- a/sbin/devfs/rule.c +++ b/sbin/devfs/rule.c @@ -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) -- cgit v1.1