summaryrefslogtreecommitdiff
path: root/udev_rules.c
AgeCommit message (Collapse)Author
2007-06-02add $sys substitutionKay Sievers
2007-05-21IMPORT: do not mangle whitespaceKay Sievers
2007-05-17replace_chars: replace spaces in node nameKay Sievers
2007-05-16udev_db: escape path names with \x00 instead of %00Kay Sievers
2007-04-30don't create $tempnode for devices without majorKay Sievers
2007-04-25unset variable with ENV{VAR}=""Kay Sievers
2007-04-06udevinfo: export all information stored in databaseKay Sievers
2007-03-31make ACTION!="add|change" workingKay Sievers
Thanks to Scott for the suggestion.
2007-03-23don't write to sysfs files during test runKay Sievers
2007-03-19update %n on netif name changeKay Sievers
2007-03-17read list of devices from index, make index private to databaseKay Sievers
2007-03-16add link_priority to rule options, and store it in databaseKay Sievers
2007-03-15update internal variables if we see $DEVPATH during IMPORTKay Sievers
2007-02-16apply format chars to ATTR before writing to sysfsKay Sievers
2007-02-01fix %c $string substitutionSergey Vlasov
Fix udev_rules_apply_format() to give error messages for unknown format elements and pass such elements to the output string unmodified. When truncating the substitution string to the length specified in the format string, head[len] = '\0' could write outside the buffer if that length was too large.
2006-09-05let $attr{symlink} return the last element of the pathKay Sievers
Example for /block/sda: SUBSYSTEMS="scsi", ENV{COMMENT}="$attr{driver}" sets COMMENT=sd SUBSYSTEMS="pci", ENV{COMMENT}="$attr{driver}" sets COMMENT=ata_piix
2006-09-05fix ENV{TEST}="Test: $env{TEST}"Kay Sievers
2006-08-28update source file headersKay Sievers
2006-08-24use fnmatch() instead of our own pattern match codeKay Sievers
2006-08-20introduce ATTR{file}="value" to set sysfs attributesKay Sievers
2006-08-19consistent key naming to match only the event device or include all parent ↵Kay Sievers
devices This scheme is more consistent and makes it obvious if a match happens against the event device only, or the full chain of parent devices. The old key names are now: BUS -> SUBSYSTEMS ID -> KERNELS SYSFS -> ATTRS DRIVER -> DRIVERS Match keys for the event device: KERNEL SUBSYSTEM ATTR DRIVER (in a future release, for now the same as DRIVERS) Match keys for all devices along the parent device chain: KERNELS SUBSYSTEMS ATTRS DRIVERS ID, BUS, SYSFS are no longer mentioned in the man page but still work. DRIVER must be converted to DRIVERS to match the new scheme. For now, an error is logged, if DRIVER is used. In a future release, the DRIVER key behaviour will change.
2006-07-04remove broken %e enumerationKay Sievers
2006-06-07remove MODALIAS key and substitutionKay Sievers
2006-04-28vol_id: fix logging from libvolume_id's log functionKay Sievers
2006-04-24allow NAME=="value" to check for already assigned valueKay Sievers
2006-04-15apply format char to variables exported by ENVKay Sievers
2006-04-11fix typo in error messageMatt Kraai
2006-04-05merge device event handling and make database content available on "remove"Kay Sievers
2006-03-07warn about %e, MODALIAS, $modaliasKay Sievers
2006-02-15exit WAIT_FOR_SYSFS if the whole device goes awayKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-31make WAIT_FOR_SYSFS usable in non "wait-only" rulesKay Sievers
Thanks to Andrey Borzenkov <arvidjaar@mail.ru> for noticing this and the initial patch to fix it. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-29let SYSFS{} look at the device, not only the parent deviceKay Sievers
The stricter parent logic broke: BUS=="ide", SYSFS{removable}=="1", ... cause removable is on the block device, which isn't a ide device. Just look for matching attributes at the device and the selected parent device at the same time now. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-27remove redundant substitution of RUN keyKay Sievers
Thanks to Andrey Borzenkov <arvidjaar@mail.ru> for the initial patch. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-25rename apply_format() cause it is public nowKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-24substitute format chars in RUN after rule matchingAndrey Borzenkov
Apply substitutions before running a program, not while the rule is parsed. It allows to use environment variables set during rule processing as command arguments.
2006-01-16fix BUS, ID, $id usageKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-13better log test and commentsKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-09replace libsysfsKay Sievers
We never used any of the libsysfs convenience features. Here we replace it completely with 300 lines of code, which are much simpler and a bit faster cause udev(d) does not open any syfs file for a simple event which does not need any parent device information. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16remove "udev_db" option from config fileKay Sievers
All udev state is kept in /$udev_root/.udev/ now. No option to configure that anymore, it will always be there. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-12remove all built-in wait_for_sysfs logicKay Sievers
Most of the issues are fixed with the kernel we depend on, for the remaing ones see the RELEASE-NOTES for a special rule to add. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07add strerror() to error logsMarco d'Itri
2005-09-14fix a debug text typo in udev_rules.cOlivier Blin
2005-08-29check the udevdb before assigning a new %eKay Sievers
A second "add" event created a new enumeration with %e. Check the udevdb first and if a matching name is already used. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-28rename ...trailing_char() to ...trailing_chars()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-28start to enforce plain ascii or valid utf8Kay Sievers
No device node or symlink can have other characters as plain readable ascii or valid utf8. The /dev/disk/by-label/* symlinks can no longer contain weird stuff read from untrusted sources. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27don't store devpath in udevdb, we don't need itKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27add and use name_list_cleanup() for cleaning up the string listsKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-27change parameter order of udev_db_search_name()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-26store ENV{key}="value" exported keys in the databaseKay Sievers
Just like the IMPORT values are stored in the udev database the exported keys are stored in the udev database. The database is also imported on a remove event before the rules are matched. So it is possible to do: ACTION=="add", KERNEL=="sda", ENV{MY_DEVICE}="1234", RUN+="/bin/logger add $devpath" ACTION=="remove", ENV{MY_DEVICE}=="1234", RUN+="/bin/logger remove $devpath" Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-16ENV{TEST}=="1" compares and ENV{TEST}="1" sets the environmentKay Sievers
This can be uses to export stuff to the event environment or to carry a state from one rule to another, like enabling/disabling later rules conditionally. Signed-off-by: Kay Sievers <kay.sievers@suse.de>