1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

125 Commits

Author SHA1 Message Date
Kay Sievers
7f2d3a3fc8 require explicit "db_persist" to exclude device info from --db-cleanup 2011-04-14 14:44:56 +02:00
Kay Sievers
d3990a576a "db_persist=" -> "db_persist" 2011-04-14 12:42:59 +02:00
Kay Sievers
02bf3e13e0 udevd: do not nice processes 2011-04-14 12:25:19 +02:00
Kay Sievers
9ead662791 udevadm: info --cleanup-db
Most of the udev database from initramfs should be deleted before
starting udev in the real root. udevadm: info --cleanup-db deletes
all database entries in /run/udev. Events that processed IMPORT{db},
or mark devices explicitely as persistent, will be excluded.
2011-04-13 22:33:01 +02:00
Kay Sievers
4ec9c3e797 use /run/udev/ if possible and fall back to /dev/.udev/ 2011-03-23 02:31:09 +01:00
Kay Sievers
5f59fa0900 move /dev/.udev/ to /dev/.run/udev/ and convert old udev database at udevd startup 2011-03-15 17:26:08 +01:00
Kay Sievers
ff0e1f4e5d check ifindex > 0 instead of subsystem == "net" 2010-12-14 11:27:02 +01:00
Harald Hoyer
851dd4ddc5 udev-rules.c: change import property buffer to 16384 bytes
import_program_into_properties() should have the same line length as
import_file_into_properties()

see also https://bugzilla.redhat.com/show_bug.cgi?id=652318
2010-11-12 14:42:35 +01:00
Yin Kangkai
27f4528b9a malloc()+memset() -> calloc() 2010-08-03 08:10:26 +02:00
Yin Kangkai
1851332c08 udevd: fix some memory leaks in error path
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
2010-08-02 12:37:55 +02:00
Kay Sievers
3b529da425 allow final assignment for OPTIONS:="nowatch"
A final assignemnt operator will disable any device watching by
inotify, and any possible later rules setting "watch" again will
be ignored.
2010-07-07 11:35:40 +02:00
Kay Sievers
7d2b68b734 IMPORT{cmdline}: start at first char after '=' 2010-05-31 11:04:42 +02:00
Kay Sievers
c4f6dcc4a5 add IMPORT{cmdline} 2010-05-31 01:13:03 +02:00
Kay Sievers
88cbfb09ee while (1) -> for (;;) 2010-05-27 15:11:00 +02:00
Kay Sievers
d80f8ffd1a fix compilation with --enable-debug 2010-05-25 15:11:02 +02:00
Kay Sievers
761dfddcc0 create static nodes provided by kernel modules to allow module autoloading 2010-05-20 17:09:04 +02:00
Kay Sievers
e85f5ec15f reset process priority before executing RUN+=
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581235
2010-05-12 08:46:56 +02:00
Kay Sievers
d0d7b8d085 add info message when empty NAME is given 2010-05-07 22:57:20 +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
6d80a7e83f remove debug output during rules parsing 2010-05-03 18:09:25 +02:00
Kay Sievers
1dbfbfbea6 use the usual TAG+=, TAG= logic 2010-04-22 19:03:11 +02:00
Kay Sievers
3f896a2abd all to match against a given TAG== 2010-04-22 18:33:24 +02:00
Kay Sievers
28460195c2 add TAG= to improve event filtering and device enumeration 2010-04-22 18:12:36 +02:00
Kay Sievers
5d69a34caf fix previous commit 2010-04-21 15:43:05 +02:00
Kay Sievers
e9906fec71 remove left-over from ignore_remove and all_partitions 2010-04-21 15:11:57 +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
4b06c40935 replace "add|change" with "!remove" 2010-04-12 16:52:41 +02:00
Kay Sievers
5539f624e1 allow IMPORT{db}="KEY" 2010-04-12 15:58:05 +02:00
Kay Sievers
fbb31cd6e1 libbudev-private: rename udev_list_entry_get_flag() 2010-03-10 14:52:42 +01:00
Kay Sievers
6d87ee2e00 print warning for BUS=, SYSFS{}=, ID= 2009-11-16 23:39:33 +01:00
Kay Sievers
cdae488a3f remove "ignore_device"
There is no way to ignore an event these days. Libudev events can
not be suppressed. It only prevents RUN keys from being executed,
which results in an inconsistent behavior in current setups.
2009-11-16 15:22:17 +01:00
Kay Sievers
081be002ea udevd: create /dev/.udev/rules.d/ before watching it wit inotify
This should also address:

On Tue, Nov 3, 2009 at 16:21, Marco d'Itri <md@linux.it> wrote:
> udev_rules_new() in udev/udev-rules.c unconditionally creates the
> directory.
> This is a problem because the function is called also by e.g. udevadm
> test, and creating /dev/.udev/ when it does not exist is an unacceptable
> side effect which will break everything else that checks for its
> existence to know if udev is running.
2009-11-04 17:06:52 +01:00
Kay Sievers
bfbf65aad0 remove "last_rule" option
Its use breaks too many things which expect to be run from independent
later rules, and is an idication that something needs to be fixed
properly instead.
2009-10-28 11:45:32 +01:00
Kay Sievers
bcb8b2315b fix SYMLINK{} option parsing 2009-09-16 18:14:03 +02:00
Kay Sievers
6c29f2b942 simplify "symlink name stack"
With well defined and kernel-supplied node names, we no longer need
to support a possible stack of conflicting symlinks and node names.
Only symlinks with identical names can be claimed by multiple devices.

This shrinks the former /dev/.udev/names/ significantly.

Also the /dev/{block,char}/MAJ:MIN" links are excluded from the name
stack - they are unique and can not conflict.
2009-09-09 18:49:07 +02:00
Kay Sievers
78715f65c9 fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
2009-09-08 22:11:04 +02:00
Kay Sievers
335e316a71 fix whitespace 2009-09-07 12:15:29 +02:00
Jeremy Kerr
d412a68573 util_run_program: restore signal mask before executing event RUN commands
External programs triggered by events (via RUN=) will inherit udev's
signal mask, which is set to block all but SIGALRM. For most utilities,
this is OK, but if we start daemons from RUN=, we run into trouble
(especially as SIGCHLD is blocked).

This change saves the original sigmask when udev starts, and restores it
just before we exec() the external command.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2009-09-07 12:13:50 +02:00
Kay Sievers
77f89e9330 Revert "udev-rules.c: remove 'first_token' variable"
That was a mistake. The variable is needed to be set before
we parse the file. Thanks a lot to Alan Jenkins for spotting
this.

This reverts commit 710fdac1e4.
2009-09-07 12:13:49 +02:00
Florian Zumbiehl
6d691b2bd6 udev-rules.c: parse_file() - fix possible buffer overflow 2009-09-01 13:26:37 +02:00
Kay Sievers
710fdac1e4 udev-rules.c: remove 'first_token' variable 2009-09-01 13:16:48 +02:00
Florian Zumbiehl
9257ecfc19 ude_rules.c: fix possible NULL pointer dereference in get_key() 2009-09-01 12:15:54 +02:00
Daniel Mierswa
959e8b5dec use nanosleep() instead of usleep()
POSIX.1-2001 declares usleep() function obsolete and POSIX.1-2008
removes it.

[Kay Sievers]
  - include time.h
  - use const for timespec
  - scsi_id: drop rand() in retry loop
  - modem-probe: rename msuspend() to msleep()
2009-08-30 23:58:57 +02:00
Kay Sievers
24d1fea8bd warn about non-readable or empty rules file 2009-08-19 07:34:07 +02:00
Kay Sievers
8e2470d68e print warning for NAME="%k" - it breaks the kernel supplied DEVNAME 2009-08-19 07:31:39 +02:00
Alan Jenkins
214a6c791c fix spelling
Fix spelling in docbook comments, code comments, and a local variable
name.  Thanks to "ispell -h" for docbook HTML and "scspell" for source
code.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-08-08 15:42:05 +02:00
Kay Sievers
16dd0aa922 "record_failed" -> "fail_event_on_error" 2009-08-06 19:23:06 +02:00
Kay Sievers
f7c5b04f69 re-enable failed event tracking
It did not work for the last couple of releases.

If RUN{record_failed}+="..." is given, a non-zero execution will mark
the event as failed. Recorded failed events can be re-triggered with:
  udevadm trigger --type=failed

The failed tracking _might_ be useful for things which might not be
ready to be executed at early bootup, but a bit later when the needed
dependencies are available. In many cases though, it indicates that
something is used in a way it should not.
2009-08-06 16:16:26 +02:00
Kay Sievers
fc206fbe3e update a few years of copyright 2009-08-01 09:39:18 -04:00