Deleted Added
full compact
devfs_rule.c (130585) devfs_rule.c (135727)
1/*-
2 * Copyright (c) 2002 Dima Dorfman.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2002 Dima Dorfman.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/fs/devfs/devfs_rule.c 130585 2004-06-16 09:47:26Z phk $
26 * $FreeBSD: head/sys/fs/devfs/devfs_rule.c 135727 2004-09-24 08:32:36Z phk $
27 */
28
29/*
30 * DEVFS ruleset implementation.
31 *
32 * A note on terminology: To "run" a rule on a dirent is to take the
33 * prescribed action; to "apply" a rule is to check whether it matches
34 * a dirent and run if if it does.

--- 564 unchanged lines hidden (view full) ---

599 * just ignore them (i.e., act like they weren't specified),
600 * since that makes a rule that only has criteria dependent on
601 * the struct cdev *match all symlinks and directories.
602 *
603 * Note also that the following tests are somewhat reversed:
604 * They're actually testing to see whether the condition does
605 * *not* match, since the default is to assume the rule should
606 * be run (such as if there are no conditions).
27 */
28
29/*
30 * DEVFS ruleset implementation.
31 *
32 * A note on terminology: To "run" a rule on a dirent is to take the
33 * prescribed action; to "apply" a rule is to check whether it matches
34 * a dirent and run if if it does.

--- 564 unchanged lines hidden (view full) ---

599 * just ignore them (i.e., act like they weren't specified),
600 * since that makes a rule that only has criteria dependent on
601 * the struct cdev *match all symlinks and directories.
602 *
603 * Note also that the following tests are somewhat reversed:
604 * They're actually testing to see whether the condition does
605 * *not* match, since the default is to assume the rule should
606 * be run (such as if there are no conditions).
607 *
608 * XXX: lacks threadref on dev
607 */
608 if (dr->dr_icond & DRC_DSWFLAGS)
609 if (dev == NULL ||
610 (dev->si_devsw->d_flags & dr->dr_dswflags) == 0)
611 goto nomatch;
612 if (dr->dr_icond & DRC_PATHPTRN)
613 if (!devfs_rule_matchpath(dk, de))
614 goto nomatch;

--- 219 unchanged lines hidden ---
609 */
610 if (dr->dr_icond & DRC_DSWFLAGS)
611 if (dev == NULL ||
612 (dev->si_devsw->d_flags & dr->dr_dswflags) == 0)
613 goto nomatch;
614 if (dr->dr_icond & DRC_PATHPTRN)
615 if (!devfs_rule_matchpath(dk, de))
616 goto nomatch;

--- 219 unchanged lines hidden ---