1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00
Commit Graph

175 Commits

Author SHA1 Message Date
Kay Sievers
4ec9c3e797 use /run/udev/ if possible and fall back to /dev/.udev/ 2011-03-23 02:31:09 +01:00
Kay Sievers
f2291cd07f fix tests and allow MODE=000 2010-05-20 14:51:18 +02:00
Kay Sievers
75cb1ac51e warn when renaming kernel-provided nodes instead of adding symlinks 2010-05-05 11:39:25 +02:00
Kay Sievers
a89d342dfb remove "ignore_remove" option 2010-04-13 12:45:38 +02:00
Kay Sievers
1f084fe581 remove "all_partitions" option
We can not predict the major/minor of non-existing devices:
  $ grep . /sys/class/block/sd*/dev
  /sys/class/block/sda1/dev:259:524288
  /sys/class/block/sda2/dev:259:262144
  /sys/class/block/sda3/dev:259:786432
  /sys/class/block/sda4/dev:259:131072
  /sys/class/block/sda/dev:259:0
  /sys/class/block/sdb/dev:259:655360
  /sys/class/block/sdc/dev:259:393216

If this functionality is still needed for some broken hardware, it needs to be
solved with a tool not part of the udev package. Because such option is unreliable
and unsafe to use.
2010-04-13 08:52:48 +02:00
Kay Sievers
5754e74c08 update tests 2010-01-27 09:30:48 +01:00
Kay Sievers
f49a6b223e udev-test.pl: catch-up with recent changes 2009-11-16 23:48:58 +01:00
Kay Sievers
9dae0e89b9 test: catch possible bug in GOTO resolving 2009-09-07 12:13:49 +02:00
Kay Sievers
2ffc9cc191 change database file names
With very deeply nested devices, We can not use a single file
name to carry an entire DEVPATH. Use <subsystem>:<sysname> as
the database filename, which should also simplify the handling
of devices moving around, as these values will not change but
still be unique.

For the name stack we use the <maj>:<min> now as the filename.

> On Tue, Aug 18, 2009 at 09:59:56AM -0400, Ric Wheeler wrote:
> The first is that udev grumbles during boot about "file name too long"
> like the following:
>
> Aug 17 06:49:58 megadeth udevd-event[20447]: unable to create db file
> '/dev/.udev/db/\x2fdevices\x2fpci0000:00\x2f0000:00:04.0\x2f0000:17:00.0\x2f0000:18:0a.0\x2f0000:1f:00.0\x2fhost11\x2fport-11:0\x2fexpander-11:0\x2fport-11:0:0\x2fexpander-11:1\x2fport-11:1:0\x2fexpander-11:2\x2fport-11:2:17\x2fexpander-11:3\x2fport-11:3:1\x2fend_device-11:3:1\x2fbsg\x2fend_device-11:3:1':
> File name too long
2009-08-19 20:49:49 +02:00
Diego Elio 'Flameeyes' Pettenò
102831867c Fix another relative path for the new working directory. 2009-08-07 19:15:31 +02:00
Diego Elio 'Flameeyes' Pettenò
405e606f86 Replace the custom test-run target with the standard make check.
A little fix is needed for the udev-test.pl script (to be called with the
proper path), but this allows for the test binaries to be only built when
running the tests themselves.
2009-08-07 19:15:28 +02:00
Benjamin Gilbert
bec7e07acc test: check string substitutions in OWNER and GROUP
String substitutions in OWNER and GROUP keys were broken in udev 137-142.
Explicitly test for this, since such breakage will not manifest in typical
rulesets.
2009-05-22 20:54:46 +02:00
Kay Sievers
065db05221 use more efficient string copying 2009-05-20 17:57:52 +02:00
Kay Sievers
a0ee5a05bb remove format char string truncation syntax 2009-05-19 12:56:17 +02:00
Kay Sievers
0c37798916 fix possible endless loop for GOTO to non-existent LABEL
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526365
2009-05-13 18:01:32 +02:00
Kay Sievers
a402404fb2 test: add test for empty and non-existent ATTR 2009-02-05 12:40:15 +01:00
Kay Sievers
647f7c49e8 fix NAME="" logic
Reported-By: Soh Kam Yung <sohkamyung@gmail.com>
2009-01-30 03:53:09 +01:00
Kay Sievers
bcf44d5576 string index - split nodes and childs to allow and unlimited number of childs 2008-11-12 05:50:05 +01:00
Kay Sievers
427e20b261 libudev: device - allocate envp array only once 2008-10-26 14:31:46 +01:00
Kay Sievers
c6243a414e test: add RUN+="socket: ..." to a test to run monitor code 2008-10-26 04:35:32 +01:00
Kay Sievers
dc4c7e463d fix $attr{[<subsystem>/<sysname>]<attribute>} substitution 2008-10-26 02:48:14 +01:00
Kay Sievers
91a75e4ad4 match KEY="A|B" without temporary string copy 2008-10-25 03:00:03 +02:00
Kay Sievers
6880b25d40 replace in-memory rules array with match/action token list
The in-memory rule array of a common desktop distro install took:
  1151088 bytes
with the token list:
  109232 bytes tokens (6827 * 16 bytes), 71302 bytes buffer
2008-10-23 00:13:59 +02:00
Kay Sievers
d960ad1546 test: fix a few unintentially wrongly written rules which cause parse errors 2008-10-17 13:54:50 +02:00
Kay Sievers
a1af6b0401 test: move global ENV{ENV_KEY_TEST}="test" to local rule 2008-10-14 19:55:57 +02:00
Kay Sievers
5c0f595d91 test: replace last reference of "/class/*" devpath 2008-09-29 05:18:23 +02:00
Kay Sievers
f2041f0116 test: add missing pci directory because of .gitignore *.7 2008-09-29 05:01:12 +02:00
Kay Sievers
c7fcba1bf4 test: replace ancient sysfs tree with recent one 2008-09-29 04:12:44 +02:00
Kay Sievers
438d4c3cd4 libudev: enumerate - split new() and scan() 2008-09-29 02:00:17 +02:00
Alan Jenkins
034b37c83f udev-test.pl: set non-zero exitcode if tests fail 2008-09-16 10:03:42 -07:00
Kay Sievers
37a123a9bc udev-test.pl: set udev_log="err" 2008-09-08 21:50:17 +02:00
Kay Sievers
e149748850 udev-test.pl: remove left-over comment from --valgrind option 2008-09-03 22:00:55 +02:00
Kay Sievers
e08109cbc8 udev-test.pl: add --valgrind option 2008-09-01 16:20:06 +02:00
Kay Sievers
01618658fd use autotools 2008-07-30 01:45:23 +02:00
Kay Sievers
282988c4f8 move default rules from /etc/udev/rules.d/ to /lib/udev/rules.d/
None of these rules is supposed to be changed by users, so move
them out of /etc. Custom rules, and automatically generated rules
stay in /etc. All rules are still processed in lexical order,
regardless which directory they live in.
2008-07-18 15:56:03 +02:00
Erik van Konijnenburg
ff94cec3d7 add substitution in MODE= field
Do substitition processing in MODE field, similar to substitution in
OWNER, GROUP etc fields.  Add test case for normal and overflow behaviour.
Document in manpage.
2008-05-19 09:05:20 +02:00
Kay Sievers
cf100ca71b allow setting of MODE="0000" 2008-04-18 21:07:29 +02:00
Kay Sievers
0ea5e96edb extend hack to allow TEST=="*/start" 2008-03-14 23:40:06 +01:00
Kay Sievers
03f65fe6a9 accept relative path for TEST 2007-08-16 12:45:31 +02:00
Kay Sievers
19096c087f restore behavior of NAME== 2007-07-25 15:29:14 +02:00
Kay Sievers
1ff1aa424b allow SYMLINK== match 2007-07-16 13:29:28 +02:00
Kay Sievers
4ad47b2de6 add "[$SUBSYSTEM/$KERNEL]<attribute>" lookup 2007-06-03 12:29:46 +02:00
Kay Sievers
c19870519d replace_chars: replace % character 2007-05-21 07:59:40 +02:00
Kay Sievers
864b9b5e37 add test for an attribute which contains an operator char 2007-02-25 01:06:20 +01:00
Kay Sievers
de49bbb223 rename "udev.c" to "test-udev.c" - it is only for testing 2006-12-08 10:29:17 +01:00
Kay Sievers
eef5447934 let $attr{symlink} return the last element of the path
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-05 02:18:06 +02:00
Kay Sievers
ac528431dd fix ENV{TEST}="Test: $env{TEST}" 2006-09-05 00:50:25 +02:00
Kay Sievers
c4edd0adb5 use new key names in test programs 2006-08-20 19:11:32 +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