X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudev.xml;h=678023c373f444aef087447b9cf9619c0ba70cea;hb=e85f5ec15f1c0a820cc81b422c2fa157d9805896;hp=4c35e197911ee16b7b30e10d3ba8f99f537a4494;hpb=2c7b88c4a55426087955a12aad33c1935e639876;p=elogind.git diff --git a/udev/udev.xml b/udev/udev.xml index 4c35e1979..678023c37 100644 --- a/udev/udev.xml +++ b/udev/udev.xml @@ -8,35 +8,38 @@ udev - August 2005 udev udev 7 - udev - dynamic device management + Linux dynamic device management DESCRIPTION - udev provides a dynamic device directory containing only the files for - actually present devices. It creates or removes device node files in the - /dev directory, or it renames network interfaces. - - Usually udev runs as udevd - 8 and receives uevents directly from the - kernel if a device is added or removed from the system. - - If udev receives a device event, it matches its configured rules - against the available device attributes provided in sysfs to identify the device. - Rules that match may provide additional device information or specify a device - node name and multiple symlink names and instruct udev to run additional programs - as part of the device event handling. + udev supplies the system software with device events, manages permissions + of device nodes and may create additional symlinks in the /dev + directory, or renames network interfaces. The kernel usually just assigns unpredictable + device names based on the order of discovery. Meaningful symlinks or network device + names provide a way to reliably identify devices based on their properties or + current configuration. + + The udev daemon udevd + 8 receives device uevents directly from + the kernel whenever a device is added or removed from the system, or it changes its + state. When udev receives a device event, it matches its configured set of rules + against various device attributes to identify the device. Rules that match, may + provide additional device information to be stored in the udev database, or information + to be used to create meaningful symlink names. + + All device information udev processes, is stored in the udev database and + sent out to possible event subscribers. Access to all stored data and the event + sources are provided by the library libudev. CONFIGURATION @@ -86,11 +89,11 @@ If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned. - A matching rule may specify the name of the device node, add a symlink - pointing to the node, or run a specified program as part of the event handling. - If no matching rule is found, the default device node name is used. + A matching rule may rename a network interface, add symlinks + pointing to the device node, or run a specified program as part of + the event handling. - A rule may consist of a list of one or more key value pairs separated by + A rule consists of a list of one or more key value pairs separated by a comma. Each key has a distinct operation, depending on the used operator. Valid operators are: @@ -104,7 +107,7 @@ - Compare for non-equality. + Compare for inequality. @@ -168,6 +171,16 @@ + + + + Match the name of a symlink targeting the node. It can + be used once a SYMLINK key has been set in one of the preceding + rules. There may be multiple symlinks; only one needs to match. + + + + @@ -229,6 +242,13 @@ + + + + Match against a device tag. + + + @@ -289,18 +309,34 @@ - The name of the node to be created, or the name the network interface - should be renamed to. + The name, a network interface should be renamed to. Or as + a temporary workaraound, the name a device node should be named. + Usually the kernel provides the defined node name, or even creates + and removes the node before udev even receives any event. Changing + the node name from the kernel's default creates inconsistencies + and is not supported. If the kernel and NAME specify different names, + an error will be logged. Udev is only expected to handle device node + permissions and to create additional symlinks, not to change + kernel-provided device node names. Instead of renaming a device node, + SYMLINK should be used. Symlink names must never conflict with + device node names, it will result in unpredictable behavior. - The name of a symlink targeting the node. Every matching rule can add - this value to the list of symlinks to be created along with the device node. - Multiple symlinks may be specified by separating the names by the space - character. + The name of a symlink targeting the node. Every matching rule will add + this value to the list of symlinks to be created. Multiple symlinks may be + specified by separating the names by the space character. In case multiple + devices claim the same name, the link will always point to the device with + the highest link_priority. If the current device goes away, the links will + be re-evaluated and the device with the next highest link_priority will own + the link. If no link_priority is specified, the order of the devices, and + which one of them will own the link, is undefined. Claiming the same name for + a symlink, which is or might be used for a device node, may result in + unexpected behavior and is not supported. + @@ -323,7 +359,21 @@ - Set a device property value. + Set a device property value. Property names with a leading '.' + are not stored in the database or exported to external tool or events. + + + + + + + Attach a tag to a device. This is used to filter events for users + of libudev's monitor functionality, or to enumerate a group of tagged + devices. The implementation can only work efficiently if only a few + tags are attached to a device. It is only meant to be used in + contexts with specific device filter requirements, and not as a + general-purpose flag. Excessive use might result in inefficient event + handling. @@ -334,13 +384,14 @@ device. This can only be used for very short running tasks. Running an event process for a long period of time may block all further events for this or a dependent device. Long running tasks need to be immediately - detached from the event process itself. - If the specified string starts with - , all current event - values will be passed to the specified socket, as a message in the same - format the kernel sends an uevent. If the first character of the specified path - is an @ character, an abstract namespace socket is used, instead of an existing - socket file. + detached from the event process itself. If the option + is + specified, and the executed program returns non-zero, the event will be + marked as failed for a possible later handling. + If no absolute path is given, the program is expected to live in + /lib/udev, otherwise the absolute path must be + specified. Program name and arguments are separated by spaces. Single quotes + can be used to specify arguments with spaces. @@ -368,7 +419,9 @@ Execute an external program specified as the assigned value and - import its output, which must be in environment key format. + import its output, which must be in environment key + format. Path specification, command/argument separation, + and quoting work like in . @@ -378,6 +431,14 @@ environment key format. + + + + Import a single property specified as the assigned value from the + current device database. This works only if the database is already populated + by an earlier event. + + @@ -398,7 +459,8 @@ - Wait for a file to become available. + Wait for a file to become available or until a 10 + seconds timeout expires. @@ -407,26 +469,6 @@ Rule and device options: - - - - Stops further rules application. No later rules will have - any effect. - - - - - - Ignore this event completely. - - - - - - Do not remove the device node when the device goes away. This may be - useful as a workaround for broken device drivers. - - @@ -434,14 +476,6 @@ priorities overwrite existing symlinks of other devices. The default is 0. - - - - Create the device nodes for all available partitions of a block device. - This may be useful for removable media devices where media changes are not - detected. - - @@ -457,6 +491,13 @@ with this option. + + + + Watch the device node with inotify, when closed after being opened for + writing, a change uevent will be synthesised. + + @@ -613,9 +654,6 @@ - The count of characters to be substituted may be limited by specifying - the format length value. For example, '%3s{file}' will only - insert the first three characters of the sysfs attribute