Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks to Scott for the suggestion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Example for /block/sda:
SUBSYSTEMS="scsi", ENV{COMMENT}="$attr{driver}"
sets COMMENT=sd
SUBSYSTEMS="pci", ENV{COMMENT}="$attr{driver}"
sets COMMENT=ata_piix
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
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>
|
|
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>
|
|
Thanks to Andrey Borzenkov <arvidjaar@mail.ru> for the initial patch.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
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.
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
|
|
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>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
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>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
|
|
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>
|
|
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>
|