diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-04-12 16:52:41 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-04-12 16:52:41 +0200 |
commit | 4b06c409350d26af5e6ace0f368d01b80d75438e (patch) | |
tree | 10d8291f4e1faf0c008e41c8570297490d45a09d /udev/udev-rules.c | |
parent | 86dc9133f88e8690aa89ccb5a240ff915b1fb69f (diff) |
replace "add|change" with "!remove"
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r-- | udev/udev-rules.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c index c4a2724032..0361f689d5 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -2055,13 +2055,12 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event struct token *cur; struct token *rule; enum escape_type esc = ESCAPE_UNSET; - int can_set_name; + bool can_set_name; if (rules->tokens == NULL) return -1; - can_set_name = ((strcmp(udev_device_get_action(event->dev), "add") == 0 || - strcmp(udev_device_get_action(event->dev), "change") == 0) && + can_set_name = ((strcmp(udev_device_get_action(event->dev), "remove") != 0) && (major(udev_device_get_devnum(event->dev)) > 0 || strcmp(udev_device_get_subsystem(event->dev), "net") == 0)); |