summaryrefslogtreecommitdiff
path: root/udev_rules.c
AgeCommit message (Collapse)Author
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>
2005-08-15cleanup some debug output and move to info level + unify select() loopsKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-13fix more compiler warnings ...Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11move some logging to the info levelKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11allow logging of all output from executed toolsKay Sievers
If USE_DEBUG=true and udev_log="debug", all output of the forked programs to stdout and stderr is send to syslog. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08switch some strlcpy's to memcpyKay Sievers
strlcpy counts the sourec string lengt and is therefore not suitable to copy a defined length of characters from one string to another. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-05read sysfs attribute also from parent class deviceKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22move code to its own filesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-20make SYSFS{} usable for all devicesKay Sievers
Patch from: Hannes Reinecke <hare@suse.de>
2005-07-16allow rules to have labels and skip to next labelKay Sievers
This will allow us to have whole blocks of rules to skip conditionally. The following section creates the node "yes": GOTO="TEST" NAME="no" NAME="no2", LABEL="NO" NAME="yes", LABEL="TEST" NAME="no3"
2005-07-16thread unknown ENV{key} match as empty valueKay Sievers
This way we can run a rule if a certain key is not set by: ENV{key}="" or ENV{key}!="?*" Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-14fix typo in GROUP value applicationAnton Farygin
2005-07-12IMPORT: add {parent} to import the persistent data of the parent deviceKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12allow multiple values to be matched with KEY=="value1|value2"Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12remember mapped rules stateKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07fix symlink values separated by multiple spacesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07update RELEASE-NOTESKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07fix default-name handling and NAME="" rulesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07add WAIT_FOR_SYSFS key to loop until a file in sysfs arrivesKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-05pack parsed rules listKay Sievers
This cuts down our 600 rules file to 98 kb instead of 1.9 Mb memory or file-size with precompiled rules. Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04replace useless defines by inline textKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04move rule matches to functionKay Sievers
Signed-off-by: Kay Sievers <kay.sievers@suse.de>