Commit Graph
62 Commits
Author SHA1 Message Date
Kay Sievers 953249a3a0 add TEST=="<file>" key 2007-06-03 00:01:46 +02:00
Kay Sievers f7e34eb3e7 events for "bus" and "class" registration must be matched as "subsystem" 2007-06-02 10:02:32 +02:00
Kay Sievers d419e96238 fix "do not access parent" warning for ATTR{} 2007-06-01 16:37:43 +02:00
Kay Sievers 2dbb47f860 add link_priority to rule options, and store it in database 2007-03-16 15:16:08 +01:00
Theodoros V. Kalamatianos 7db33ac19c fix udev attribute names with a colon 2007-02-25 01:04:23 +01:00
Kay Sievers 915fde1738 update DRIVER== changes 2007-02-24 23:43:04 +01:00
Kay Sievers 273bebdba6 exclude parent devices from DRIVER== match
We have DRIVERS= for this.
2007-02-01 20:23:41 +01:00
Kay Sievers 9dd0c2573b rename config "filename" to "dir" 2006-12-08 09:48:53 +01:00
Kay Sievers b4e4b5a5db fix spelling in deprecation warning
Found by Andreas Hanke.
2006-09-20 20:22:57 +02:00
Kay Sievers 7b5206d609 don't print PHYSDEV* warnings for old WAIT_FOR_SYSFS rules 2006-09-18 22:14:18 +02:00
Kay Sievers 091a660d43 warn if a PHYSEDV* key, the "device" link, or a parent attribute is used 2006-09-18 02:01:29 +02:00
Kay Sievers 27b77df44d update source file headers 2006-08-28 00:29:11 +02:00
Kay Sievers 8bb39322f0 always expect KEY{value} on ATTR, ATTRS, ENV keys 2006-08-20 19:08:37 +02:00
Kay Sievers c472055c90 fix typo in SUBSYSTEMS key parsing 2006-08-20 18:20:55 +02:00
Kay Sievers d0c8cb7d9c introduce ATTR{file}="value" to set sysfs attributes 2006-08-20 18:16:27 +02:00
Kay Sievers 38895e573c skip rule, if too may keys of the same type are used 2006-08-20 18:15:29 +02:00
Kay Sievers 95776dc6ec consistent key naming to match only the event device or include all parent 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-08-19 16:06:25 +02:00
Kay Sievers d4ae9925ee don't report an error on overlong comment lines 2006-08-13 04:23:16 +02:00
Kay Sievers 8912051213 remove MODALIAS key and substitution 2006-06-07 16:00:34 +02:00
Kay Sievers b1c4f377c4 add more warnings for invalid key operations 2006-05-01 01:45:26 +02:00
Kay Sievers d59c84effd allow NAME=="value" to check for already assigned value 2006-04-24 19:25:55 +02:00
Kay Sievers bf289c06bf fix spelling error in debug string 2006-03-21 16:17:28 +01:00
Kay Sievers d2f605c8d6 find programs in /lib/udev for IMPORT if {program} is not given
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-26 03:59:13 +01:00
Kay Sievers 1aa1e24848 replace libsysfs
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>
2006-01-09 21:18:00 +01:00
Marco d'Itri df4e89bfa6 move some logging from dbg() to info() 2005-11-07 18:52:03 +01:00
Marco d'Itri ff3e4bed21 add strerror() to error logs 2005-11-07 18:44:18 +01:00
Kay Sievers 271c2d7d26 let NAME="" supress node creation, but do RUN keys
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-07 16:00:41 +01:00
Kay Sievers 287814b23c remove precompiled rules option
It was a workaround for speed up udev "coldplug", where ~800 events
happened a second time during bootup. No need for it with the rules
aleady parsed in the daemon.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-05 20:00:31 +01:00
Kay Sievers 916c5e4725 fix the new warnings I asked for
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-10-27 20:32:07 +02:00
Kay Sievers 40caaeec51 cleanup some debug output and move to info level + unify select() loops
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-15 11:57:04 +02:00
Kay Sievers bfd1294892 add flag for reading of precompiled rules
Rules can be precompiled and stored on disk for initramfs, to avoid
parsing the rules with every event again and again. Also the OWNER and
GROUP names are already resolved to numerical values in the compiled
rules. This flag is used for the upcoming move of the rules parsing
into udevd:
  If the real root is mounted udevd is started and parses the rules
  only once. The event processes will inherit the already parsed rules
  from the daemon, so we want to ignore any precompiled rules and
  use the real rules files and watch the filesystem for changes to
  reload the rules automatically.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 17:43:42 +02:00
Kay Sievers 63cc8f0491 allow clean shutdown of udevd
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 05:07:36 +02:00
Kay Sievers 13d11705bf switch some strlcpy's to memcpy
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-08 02:21:55 +02:00
Kay Sievers e8d569b414 move code to its own files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22 12:35:58 -04:00
Kay Sievers 422d5becc3 add padding to rules structure
Some architectures really want well alingned structures.
Thanks to Jim Gifford <maillist@jg555.com> for help finding it.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-17 09:40:29 -04:00
Kay Sievers 594dd61025 allow rules to have labels and skip to next label
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-16 07:46:31 +02:00
Kay Sievers 0bfb84e1ed IMPORT: add {parent} to import the persistent data of the parent device
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 14:46:36 +02:00
Kay Sievers ef520ba25f remember mapped rules state
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 11:42:39 +02:00
Kay Sievers a72e3f666b fix typo in group assignment
Thanks to: Georgi Georgiev
2005-07-07 22:40:09 +02:00
Kay Sievers 613ffbeb15 fix default-name handling and NAME="" rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 22:32:48 +02:00
Kay Sievers b2fe4b9ac9 add WAIT_FOR_SYSFS key to loop until a file in sysfs arrives
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 20:05:51 +02:00
Kay Sievers 2858b86c6a don't resolve OWNER, GROUP on precompile if string contains %, $
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-06 02:01:16 +02:00
Kay Sievers 8bd41f36f7 pack parsed rules list
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-05 15:24:41 +02:00
Kay Sievers 6369839195 replace useless defines by inline text
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04 20:42:04 +02:00
Kay Sievers a0e5382d66 move rule matches to function
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04 19:44:25 +02:00
Kay Sievers be0856c841 prepare RELEASE-NOTES
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-30 21:50:22 +02:00
Kay Sievers 319c670016 IMPORT allow to import program returned keys into the env
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 18:58:49 +02:00
Kay Sievers bd0ed2ffbe IMPORT=<file> allow to import a shell-var style config-file
This allows to source-in a file into the udev environment to have
the defined keys available for later processing by udev itself or
the forked helper programs.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 13:10:16 +02:00
Kay Sievers 6bf0ffe8fd allow rules to be compiled to one binary file
All the rule files can be compiled into a single file,
which can be mapped into the udev process to avoid parsing
the rules with every event.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-24 18:05:32 +02:00
Kay Sievers bf5d296473 prepare for module loading rules and add MODALIAS key
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-20 00:29:38 +02:00