From a9bc94e558fd75ca2e6b52607dcd9b5ff29449a7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 22 Jan 2019 15:52:39 +0900 Subject: [PATCH] man: udevadm: clarify the behavior when multiple matching rules are specified Closes #2995. --- man/udevadm.xml | 80 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/man/udevadm.xml b/man/udevadm.xml index 1a60aef..b7a2494 100644 --- a/man/udevadm.xml +++ b/man/udevadm.xml @@ -185,11 +185,11 @@ udevadm trigger <arg choice="opt"><replaceable>options</replaceable></arg> - <arg choice="opt" rep="repeat"><replaceable>devpath</replaceable>|<replaceable>file</replaceable>|<replaceable>unit</replaceable></arg> + <arg choice="opt"><replaceable>devpath</replaceable>|<replaceable>file</replaceable>|<replaceable>unit</replaceable></arg> Request device events from the kernel. Primarily used to replay events at system coldplug time. - Takes one or more device specifications as arguments. See the description of info + Takes a device specification as a positional argument. See the description of info above. @@ -229,8 +229,9 @@ Trigger events for devices which belong to a - matching subsystem. This option can be specified multiple - times and supports shell style pattern matching. + matching subsystem. This option supports shell style pattern matching. + When this option is specified more than once, then each matching result is ORed, that is, + all the devices in each subsystem are triggered. @@ -238,77 +239,74 @@ Do not trigger events for devices which belong to a matching subsystem. This option - can be specified multiple times and supports shell style pattern matching. + supports shell style pattern matching. When this option is specified more than once, + then each matching result is ANDed, that is, devices which do not match all specified + subsystems are triggered. - Trigger events for devices with a matching sysfs - attribute. If a value is specified along with the - attribute name, the content of the attribute is matched - against the given value using shell style pattern - matching. If no value is specified, the existence of the - sysfs attribute is checked. This option can be specified - multiple times. + Trigger events for devices with a matching sysfs attribute. If a value is specified along + with the attribute name, the content of the attribute is matched against the given value using + shell style pattern matching. If no value is specified, the existence of the sysfs attribute is + checked. When this option is specified multiple times, then each matching result is ANDed, + that is, only devices which have all specified attributes are triggered. - Do not trigger events for devices with a matching - sysfs attribute. If a value is specified along with the - attribute name, the content of the attribute is matched - against the given value using shell style pattern - matching. If no value is specified, the existence of the - sysfs attribute is checked. This option can be specified - multiple times. + Do not trigger events for devices with a matching sysfs attribute. If a value is specified + along with the attribute name, the content of the attribute is matched against the given value + using shell style pattern matching. If no value is specified, the existence of the sysfs attribute + is checked. When this option is specified multiple times, then each matching result is ANDed, + that is, only devices which have none of the specified attributes are triggered. - Trigger events for devices with a matching property - value. This option can be specified multiple times and - supports shell style pattern matching. + Trigger events for devices with a matching property value. This option supports shell style + pattern matching. When this option is specified more than once, then each matching result is ORed, + that is, devices which have one of the specified properties are triggered. - Trigger events for devices with a matching tag. This - option can be specified multiple times. + Trigger events for devices with a matching tag. When this option is specified multiple times, + then each matching result is ANDed, that is, devices which have all specified tags are triggered. - + - Trigger events for devices for which the last component - (i.e. the filename) of the /sys path matches - the specified PATH. This option can be - specified multiple times and also supports shell style pattern - matching. + Trigger events for devices for which the last component (i.e. the filename) of the + /sys path matches the specified PATH. This option + supports shell style pattern matching. When this option is specified more than once, then each + matching result is ORed, that is, all devices which have any of the specified + NAME are triggered. - Trigger events for devices with a matching - device path. This option can be specified multiple - times. + Trigger events for devices with a matching device path. When this option is specified more than once, + the last NAME is used. - Trigger events for all children of a given - device. + Trigger events for all children of a given device. When this option is specified more than once, + the last NAME is used. @@ -334,8 +332,8 @@ - In addition, optional positional arguments can be used - to specify device names or sys paths. They must start with + In addition, an optional positional argument can be used + to specify device name or sys path. It must start with /dev or /sys respectively. @@ -486,14 +484,18 @@ - Filter kernel uevents and udev events by subsystem[/devtype]. Only events with a matching subsystem value will pass. + Filter kernel uevents and udev events by subsystem[/devtype]. Only events with a matching subsystem value will pass. + When this option is specified more than once, then each matching result is ORed, that is, all devices in the specified + subsystems are monitored. - Filter udev events by tag. Only udev events with a given tag attached will pass. + Filter udev events by tag. Only udev events with a given tag attached will pass. + When this option is specified more than once, then each matching result is ORed, that is, devices which have one of the + specified tags are monitored. -- 2.7.4