summaryrefslogtreecommitdiff
path: root/extras/udev-acl
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-04-12 16:52:41 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-04-12 16:52:41 +0200
commit4b06c409350d26af5e6ace0f368d01b80d75438e (patch)
tree10d8291f4e1faf0c008e41c8570297490d45a09d /extras/udev-acl
parent86dc9133f88e8690aa89ccb5a240ff915b1fb69f (diff)
replace "add|change" with "!remove"
Diffstat (limited to 'extras/udev-acl')
-rw-r--r--extras/udev-acl/70-acl.rules2
-rw-r--r--extras/udev-acl/udev-acl.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/extras/udev-acl/70-acl.rules b/extras/udev-acl/70-acl.rules
index fde265693c..5b00bf82c7 100644
--- a/extras/udev-acl/70-acl.rules
+++ b/extras/udev-acl/70-acl.rules
@@ -4,7 +4,7 @@
# udev-acl of this udev release and may be replaced at any time.
ENV{MAJOR}=="", GOTO="acl_end"
-ACTION!="add|change", GOTO="acl_apply"
+ACTION=="remove", GOTO="acl_apply"
# PTP/MTP protocol devices, cameras, portable media players
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="", ENV{DEVTYPE}=="usb_device", IMPORT{program}="usb_id --export %p"
diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c
index c070fccd17..ce515902e0 100644
--- a/extras/udev-acl/udev-acl.c
+++ b/extras/udev-acl/udev-acl.c
@@ -353,12 +353,10 @@ int main (int argc, char* argv[])
switch (option) {
case 'a':
- if (strcmp(optarg, "add") == 0 || strcmp(optarg, "change") == 0)
- action = ACTION_ADD;
- else if (strcmp(optarg, "remove") == 0)
+ if (strcmp(optarg, "remove") == 0)
action = ACTION_REMOVE;
else
- goto out;
+ action = ACTION_ADD;
break;
case 'D':
device = optarg;