1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 23:51:28 +03:00
Commit Graph

529 Commits

Author SHA1 Message Date
Kay Sievers
ebd189621f do not rename the database on device rename
Harald Hoyer discovered some incorrect behavior while debugging
problems with network interface renaming:

Udev events might be queued for devices which are renamed. A new
device registered the same time may claime the old name and create
a database entry for it. The current rename logic would move over
this databse entry to the wrong device.
2010-08-11 14:34:32 +02:00
Kay Sievers
ce9a42bec4 always log error when renaming a network interface fails 2010-08-11 14:29:49 +02:00
Harald Hoyer
09c0310302 udev-event.c: rename interface to <src>-<dest>, if <dest> taken
e.g. if eth0 should be eth3 and eth3 is waiting to be renamed,
eth0 was renamed to eth0_rename. The kernel would take eth0 as the name
for a new interface and this new eth0 could also become eth0_rename, if
the target name is also taken. To prevent this name clash, the
interfaces are now renamed to <src>-<dest> and the rename is logged.
2010-08-10 16:46:48 +02:00
Yin Kangkai
08f11597f2 udevd: create static device links only when the target exists
For example, not all systems have PROC_KCORE enabled. Avoid a broken symbolic
link in those cases.

Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 20:35:46 +02:00
Yin Kangkai
40929a0222 udevd: fix unref'ing of device in error path
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 20:29:13 +02:00
Kay Sievers
8e5a620b17 call util_delete_path() only when we actually deleted stuff 2010-08-03 12:13:53 +02:00
Yin Kangkai
4ab3c463d4 udevd: fix short options in getopt() 2010-08-03 08:11:43 +02: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
Yin Kangkai
163c0365ff udevadm: fix short options in getopt() 2010-07-28 06:56:13 +02:00
Kay Sievers
35df38c36a udevd: init_notify() fix abstract namespace name handling 2010-07-11 23:57:11 +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
a65aa40f8a udevd: in case we don't daemonize, send READY message to /sbin/init 2010-06-17 21:52:15 +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
1182b9470f udevd: set umask before creating files/directories 2010-05-30 23:42:47 +02:00
Kay Sievers
b130944f99 man: udevd - update intro 2010-05-29 22:51:55 +02:00
Kay Sievers
8f7f1a2b52 man: add kernel command line parameters 2010-05-29 22:24:21 +02:00
Kay Sievers
9fa68615bb man: add static device nodes and udevd debug options 2010-05-28 15:11:36 +02:00
Kay Sievers
c830e98d6a udevd: read debug settings from kernel commandline 2010-05-28 12:07:27 +02:00
Kay Sievers
d4c1467f85 udevd: fix comments 2010-05-27 17:45:58 +02:00
Kay Sievers
337d102783 udevd: replace --debug-trace with --children-max 2010-05-27 17:41:51 +02:00
Kay Sievers
87d55ff672 childs -> children 2010-05-27 17:27:56 +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
Bryan Kadzban
4bfa5cf5c3 udevd: fix typo /proc/fd -> /proc/self/fd 2010-05-25 06:56:37 +02:00
Kay Sievers
63749b1a5f man: directly use 'refentry'
And make Lennart happy! :)
2010-05-24 17:00:15 +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
f2291cd07f fix tests and allow MODE=000 2010-05-20 14:51:18 +02:00
Kay Sievers
cb9a0eeeab udevd: create standard symlinks and handle /lib/udev/devices 2010-05-20 09:04:26 +02:00
Kay Sievers
c1332ae898 use default mode of 0600 for nodes if gid == 0 2010-05-20 06:24:45 +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
79e1912b91 udevd: reload config only for *.rules files 2010-05-11 22:59:09 +02:00
Kay Sievers
d0d7b8d085 add info message when empty NAME is given 2010-05-07 22:57:20 +02:00
Kay Sievers
2f71757d1c man: udevadm trigger - the default is "change" not "add" 2010-05-05 15:37:56 +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
c7cdd8b2d2 remove unused parameter from udev_node_mknod() 2010-05-03 18:08:51 +02:00
Michael Thayer
c00b776880 fix device node deletion
Signed-off-by: Michael Thayer <michael.thayer@sun.com>
2010-05-01 17:29:24 +02:00
Kay Sievers
665ee17def udevd: always try to find an idle worker instead of forking a new one
We special-handle events with a TIMEOUT= set, so they don't get queued
or wait for parent events to finish, to make sure we can handle them
as fast as possible.

With this change we first try to find an idle worker process before
forking a new one.
2010-04-26 12:25:59 +02:00
Kay Sievers
c1dbe11dc3 delete old tags when configuration changes 2010-04-23 09:01:56 +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
e7964b93e8 udevadm: info --export-db -- remove watch handle export 2010-04-22 06:24:47 +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
60067cc75a more readlink buffer size handling 2010-04-21 14:44:33 +02:00
Mathias Nyman
e925018786 remove buffer-overrun risk in readlink call
readlink does not write a nul character to the end of the
string it returns. Therefore ask for one fewer character
than the buffer size so there's always room for an extra \0.

Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-04-21 13:41:14 +02:00
Kay Sievers
85f22036fc doc: add section about how *not* to rename device nodes
Thanks to Mario 'BitKoenig' Holbe <Mario.Holbe@tu-ilmenau.de>.
2010-04-20 07:29:51 +02:00