diff options
author | phk <phk@FreeBSD.org> | 2005-02-27 17:22:36 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-02-27 17:22:36 +0000 |
commit | 537769f6992aad9ba96045b70cc1e5995b8b245e (patch) | |
tree | c75d117fc1de6974054510b8b0a1563d6435e2aa /sbin/devfs | |
parent | 116d1ffddd7dc79adcdd883aa94fbfe19673bde6 (diff) | |
download | FreeBSD-src-537769f6992aad9ba96045b70cc1e5995b8b245e.zip FreeBSD-src-537769f6992aad9ba96045b70cc1e5995b8b245e.tar.gz |
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.
Diffstat (limited to 'sbin/devfs')
-rw-r--r-- | sbin/devfs/devfs.8 | 7 | ||||
-rw-r--r-- | sbin/devfs/rule.c | 8 |
2 files changed, 2 insertions, 13 deletions
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) |