chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
86dc913
)
replace "add|change" with "!remove"
author
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 12 Apr 2010 14:52:41 +0000
(16:52 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 12 Apr 2010 14:52:41 +0000
(16:52 +0200)
19 files changed:
extras/cdrom_id/60-cdrom_id.rules
patch
|
blob
|
history
extras/edd_id/61-persistent-storage-edd.rules
patch
|
blob
|
history
extras/fstab_import/79-fstab_import.rules
patch
|
blob
|
history
extras/hid2hci/70-hid2hci.rules
patch
|
blob
|
history
extras/keymap/95-keyboard-force-release.rules
patch
|
blob
|
history
extras/keymap/95-keymap.rules
patch
|
blob
|
history
extras/udev-acl/70-acl.rules
patch
|
blob
|
history
extras/udev-acl/udev-acl.c
patch
|
blob
|
history
extras/v4l_id/60-persistent-v4l.rules
patch
|
blob
|
history
rules/rules.d/60-persistent-alsa.rules
patch
|
blob
|
history
rules/rules.d/60-persistent-input.rules
patch
|
blob
|
history
rules/rules.d/60-persistent-serial.rules
patch
|
blob
|
history
rules/rules.d/60-persistent-storage-tape.rules
patch
|
blob
|
history
rules/rules.d/60-persistent-storage.rules
patch
|
blob
|
history
rules/rules.d/75-net-description.rules
patch
|
blob
|
history
rules/rules.d/75-tty-description.rules
patch
|
blob
|
history
rules/suse/64-device-mapper.rules
patch
|
blob
|
history
udev/udev-rules.c
patch
|
blob
|
history
udev/udevd.c
patch
|
blob
|
history
diff --git
a/extras/cdrom_id/60-cdrom_id.rules
b/extras/cdrom_id/60-cdrom_id.rules
index 811c4aa53096ec14fa2e3bd88ed82ebedc2e037d..16b3af9e92f2b2579e1607f9368833144e32da6d 100644
(file)
--- a/
extras/cdrom_id/60-cdrom_id.rules
+++ b/
extras/cdrom_id/60-cdrom_id.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="cdrom_end"
+ACTION
=="remov
e", GOTO="cdrom_end"
SUBSYSTEM!="block", GOTO="cdrom_end"
KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
SUBSYSTEM!="block", GOTO="cdrom_end"
KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
diff --git
a/extras/edd_id/61-persistent-storage-edd.rules
b/extras/edd_id/61-persistent-storage-edd.rules
index 54ae0865e49fad990846f21c1dd9a39c074c0945..1ab1be347e22876acd51313a9a9ac0fd1c809230 100644
(file)
--- a/
extras/edd_id/61-persistent-storage-edd.rules
+++ b/
extras/edd_id/61-persistent-storage-edd.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="persistent_storage_edd_end"
+ACTION
=="remov
e", GOTO="persistent_storage_edd_end"
SUBSYSTEM!="block", GOTO="persistent_storage_edd_end"
KERNEL!="sd*|hd*|cciss*", GOTO="persistent_storage_edd_end"
SUBSYSTEM!="block", GOTO="persistent_storage_edd_end"
KERNEL!="sd*|hd*|cciss*", GOTO="persistent_storage_edd_end"
diff --git
a/extras/fstab_import/79-fstab_import.rules
b/extras/fstab_import/79-fstab_import.rules
index 2adfe04c733a1e579e8cd4b57a31f203b6d5045a..2ded7d3d9fd9d1da1a31f889eb86ded4a8c689ad 100644
(file)
--- a/
extras/fstab_import/79-fstab_import.rules
+++ b/
extras/fstab_import/79-fstab_import.rules
@@
-1,2
+1,2
@@
-ACTION
=="add|chang
e", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}"
+ACTION
!="remov
e", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem|other", IMPORT="fstab_import $name $links mapper/$env{DM_NAME}"
diff --git
a/extras/hid2hci/70-hid2hci.rules
b/extras/hid2hci/70-hid2hci.rules
index 01ff30d4172cb49893eff63d04589d6762260f4a..0687c8aa7891f007ff1c580abf411bbad6ed6ee9 100644
(file)
--- a/
extras/hid2hci/70-hid2hci.rules
+++ b/
extras/hid2hci/70-hid2hci.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="hid2hci_end"
+ACTION
=="remov
e", GOTO="hid2hci_end"
SUBSYSTEM!="usb", GOTO="hid2hci_end"
# Variety of Dell Bluetooth devices - match on a mouse device that is
SUBSYSTEM!="usb", GOTO="hid2hci_end"
# Variety of Dell Bluetooth devices - match on a mouse device that is
diff --git
a/extras/keymap/95-keyboard-force-release.rules
b/extras/keymap/95-keyboard-force-release.rules
index f0e1ab82e7db1a23bf03a1fa277289fec600194a..b973614c8511f13769e50dc58768e5cca4c826b3 100644
(file)
--- a/
extras/keymap/95-keyboard-force-release.rules
+++ b/
extras/keymap/95-keyboard-force-release.rules
@@
-11,7
+11,7
@@
# /lib/udev/keymap -i /dev/input/eventX
# on a Linux vt to find out.
# /lib/udev/keymap -i /dev/input/eventX
# on a Linux vt to find out.
-ACTION
!="add|chang
e", GOTO="force_release_end"
+ACTION
=="remov
e", GOTO="force_release_end"
SUBSYSTEM!="serio", GOTO="force_release_end"
KERNEL!="serio*", GOTO="force_release_end"
DRIVER!="atkbd", GOTO="force_release_end"
SUBSYSTEM!="serio", GOTO="force_release_end"
KERNEL!="serio*", GOTO="force_release_end"
DRIVER!="atkbd", GOTO="force_release_end"
diff --git
a/extras/keymap/95-keymap.rules
b/extras/keymap/95-keymap.rules
index dd58453a15b65477e06727fa689dea563d5f2715..2f41cb474232ae62bf81ad54a5f75e76f217b3ce 100644
(file)
--- a/
extras/keymap/95-keymap.rules
+++ b/
extras/keymap/95-keymap.rules
@@
-5,7
+5,7
@@
# a file name (in /lib/udev/keymaps), which has to contain scancode/keyname
# pairs.
# a file name (in /lib/udev/keymaps), which has to contain scancode/keyname
# pairs.
-ACTION
!="add|chang
e", GOTO="keyboard_end"
+ACTION
=="remov
e", GOTO="keyboard_end"
SUBSYSTEM!="input", GOTO="keyboard_end"
KERNEL!="event*", GOTO="keyboard_end"
SUBSYSTEM!="input", GOTO="keyboard_end"
KERNEL!="event*", GOTO="keyboard_end"
diff --git
a/extras/udev-acl/70-acl.rules
b/extras/udev-acl/70-acl.rules
index fde265693c53814b99aa3483e03d9f8771a7825b..5b00bf82c766fce8c613e5b5fed2cb82b92dbe88 100644
(file)
--- 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"
# udev-acl of this udev release and may be replaced at any time.
ENV{MAJOR}=="", GOTO="acl_end"
-ACTION
!="add|chang
e", GOTO="acl_apply"
+ACTION
=="remov
e", 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"
# 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 c070fccd17a6b45efd750cf720950497d809af19..ce515902e0556262660eba8d84295b012969a57d 100644
(file)
--- 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':
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
action = ACTION_REMOVE;
else
-
goto out
;
+
action = ACTION_ADD
;
break;
case 'D':
device = optarg;
break;
case 'D':
device = optarg;
diff --git
a/extras/v4l_id/60-persistent-v4l.rules
b/extras/v4l_id/60-persistent-v4l.rules
index a342a71949a3137c581016eafe9cd3614d52083e..b6e1313a3149cdbe48badc9c64231665e6fc5c15 100644
(file)
--- a/
extras/v4l_id/60-persistent-v4l.rules
+++ b/
extras/v4l_id/60-persistent-v4l.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="persistent_v4l_end"
+ACTION
=="remov
e", GOTO="persistent_v4l_end"
SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
ENV{MAJOR}=="", GOTO="persistent_v4l_end"
SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
ENV{MAJOR}=="", GOTO="persistent_v4l_end"
diff --git
a/rules/rules.d/60-persistent-alsa.rules
b/rules/rules.d/60-persistent-alsa.rules
index a5206fdbb15a1b794dde55774390793e8c8362d3..39a365221eee5ea28b2df7da80de27e4ae3e2a59 100644
(file)
--- a/
rules/rules.d/60-persistent-alsa.rules
+++ b/
rules/rules.d/60-persistent-alsa.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="persistent_alsa_end"
+ACTION
=="remov
e", GOTO="persistent_alsa_end"
SUBSYSTEM!="sound", GOTO="persistent_alsa_end"
KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end"
SUBSYSTEM!="sound", GOTO="persistent_alsa_end"
KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end"
diff --git
a/rules/rules.d/60-persistent-input.rules
b/rules/rules.d/60-persistent-input.rules
index 1ea4431d29a5d4f2d86085649367f85aabab49eb..634c4dbeaf8ede228f729d5fe254aa651c2b2c23 100644
(file)
--- a/
rules/rules.d/60-persistent-input.rules
+++ b/
rules/rules.d/60-persistent-input.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="persistent_input_end"
+ACTION
=="remov
e", GOTO="persistent_input_end"
SUBSYSTEM!="input", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"
SUBSYSTEM!="input", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"
diff --git
a/rules/rules.d/60-persistent-serial.rules
b/rules/rules.d/60-persistent-serial.rules
index 351b3856fdb999a001dd2da274ad1341272ba06e..3e1a56550af753eef8bcf2f935a311f24da798e3 100644
(file)
--- a/
rules/rules.d/60-persistent-serial.rules
+++ b/
rules/rules.d/60-persistent-serial.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="persistent_serial_end"
+ACTION
=="remov
e", GOTO="persistent_serial_end"
SUBSYSTEM!="tty", GOTO="persistent_serial_end"
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end"
SUBSYSTEM!="tty", GOTO="persistent_serial_end"
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="persistent_serial_end"
diff --git
a/rules/rules.d/60-persistent-storage-tape.rules
b/rules/rules.d/60-persistent-storage-tape.rules
index 968528d845848ac4191766c804d9bb54feb4bd48..833ef94daabb4805ed3d23f4327080f80c80bd02 100644
(file)
--- a/
rules/rules.d/60-persistent-storage-tape.rules
+++ b/
rules/rules.d/60-persistent-storage-tape.rules
@@
-2,7
+2,7
@@
# persistent storage links: /dev/tape/{by-id,by-path}
# persistent storage links: /dev/tape/{by-id,by-path}
-ACTION
!="add|chang
e", GOTO="persistent_storage_tape_end"
+ACTION
=="remov
e", GOTO="persistent_storage_tape_end"
# type 8 devices are "Medium Changers"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
# type 8 devices are "Medium Changers"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}"
diff --git
a/rules/rules.d/60-persistent-storage.rules
b/rules/rules.d/60-persistent-storage.rules
index 89041a950b9cda75665179e056288a8d84ccaa82..d9f8003cdea7a2c9cbe59cac6889af7e193d869b 100644
(file)
--- a/
rules/rules.d/60-persistent-storage.rules
+++ b/
rules/rules.d/60-persistent-storage.rules
@@
-6,7
+6,7
@@
# forward scsi device event to corresponding block device
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
# forward scsi device event to corresponding block device
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
-ACTION
!="add|chang
e", GOTO="persistent_storage_end"
+ACTION
=="remov
e", GOTO="persistent_storage_end"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
# skip rules for inappropriate block devices
SUBSYSTEM!="block", GOTO="persistent_storage_end"
# skip rules for inappropriate block devices
diff --git
a/rules/rules.d/75-net-description.rules
b/rules/rules.d/75-net-description.rules
index 1c4c401d3b30efae2fc8feacfa0a8fdf63abf15f..490fcced1ecbb89d912d4418df4c92b58ab0f8f6 100644
(file)
--- a/
rules/rules.d/75-net-description.rules
+++ b/
rules/rules.d/75-net-description.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="net_end"
+ACTION
=="remov
e", GOTO="net_end"
SUBSYSTEM!="net", GOTO="net_end"
SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
SUBSYSTEM!="net", GOTO="net_end"
SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
diff --git
a/rules/rules.d/75-tty-description.rules
b/rules/rules.d/75-tty-description.rules
index ac868adc0ab5f7195f84dec4a9af8a0c2948729f..c2980cfb6988c29f93f99eb8055c6655965ed1f8 100644
(file)
--- a/
rules/rules.d/75-tty-description.rules
+++ b/
rules/rules.d/75-tty-description.rules
@@
-1,6
+1,6
@@
# do not edit this file, it will be overwritten on update
# do not edit this file, it will be overwritten on update
-ACTION
!="add|chang
e", GOTO="tty_end"
+ACTION
=="remov
e", GOTO="tty_end"
SUBSYSTEM!="tty", GOTO="tty_end"
SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
SUBSYSTEM!="tty", GOTO="tty_end"
SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{program}="usb_id --export %p"
diff --git
a/rules/suse/64-device-mapper.rules
b/rules/suse/64-device-mapper.rules
index 34e3307569b084d8cd30cd1ee254940e1c7036d4..12cae35da82e01de63159ac895d33e28c93b2337 100644
(file)
--- a/
rules/suse/64-device-mapper.rules
+++ b/
rules/suse/64-device-mapper.rules
@@
-1,7
+1,7
@@
# do not edit this file, it will be overwritten on update
KERNEL!="dm-*", GOTO="device_mapper_end"
# do not edit this file, it will be overwritten on update
KERNEL!="dm-*", GOTO="device_mapper_end"
-ACTION
!="add|chang
e", GOTO="device_mapper_end"
+ACTION
=="remov
e", GOTO="device_mapper_end"
IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
ENV{DM_NAME}!="?*", GOTO="device_mapper_end"
IMPORT{program}="/sbin/dmsetup export -j%M -m%m"
ENV{DM_NAME}!="?*", GOTO="device_mapper_end"
diff --git
a/udev/udev-rules.c
b/udev/udev-rules.c
index c4a2724032c8648195b607a6c9a03952a9c8f2de..0361f689d59efc6d97372cf800b97673c7812c23 100644
(file)
--- 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;
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;
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));
(major(udev_device_get_devnum(event->dev)) > 0 ||
strcmp(udev_device_get_subsystem(event->dev), "net") == 0));
diff --git
a/udev/udevd.c
b/udev/udevd.c
index fe3352ceb513519afa20cbb8f976d44ad00fe633..c27b4cd6aa2cd13052335d9433ee5ef74a5d4cb0 100644
(file)
--- a/
udev/udevd.c
+++ b/
udev/udevd.c
@@
-168,7
+168,7
@@
static void event_queue_delete(struct event *event)
udev_list_node_remove(&event->node);
/* mark as failed, if "add" event returns non-zero */
udev_list_node_remove(&event->node);
/* mark as failed, if "add" event returns non-zero */
- if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "
add") =
= 0)
+ if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "
remove") !
= 0)
udev_queue_export_device_failed(udev_queue_export, event->dev);
else
udev_queue_export_device_finished(udev_queue_export, event->dev);
udev_queue_export_device_failed(udev_queue_export, event->dev);
else
udev_queue_export_device_finished(udev_queue_export, event->dev);