Age | Commit message (Collapse) | Author |
|
When building with './configure --enable-debug && make' it fails with:
udev-rules.c: In function ‘dump_token’:
udev-rules.c:366: error: ‘struct <anonymous>’ has no member named ‘i’
Signed-off-by: Michael Prokop <mika@grml.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also return a udev_device when looking up by handle as well, so
everything works the same way.
|
|
|
|
|
|
Move some of the checks into udev_watch_begin() and udev_watch_clear()
so we don't have to repeat them all the time.
|
|
Likewise when re-processing an event, we want to drop the existing
inotify watch first to avoid side-effects.
|
|
The programs we RUN can open device nodes, and thus we can end up
chasing our own tail.
|
|
|
|
|
|
This allows you to re-process the rules if the content of the device
has been changed, most useful for block subsystem to cause vol_id to
be run again.
|
|
Scott discovered this silly bug.
|
|
|
|
Reported-By: Soh Kam Yung <sohkamyung@gmail.com>
|
|
Reported-by: Robert Peterson <rpeterso@redhat.com>
|
|
|
|
<Keybuk> poll, select, ppoll, pselect, epoll, etc. are *explicitly* NOT restarted in case of signal
<kay> ok
|
|
|
|
|
|
Conflicts:
udev/udevd.c
|
|
|
|
udevd's event_queue_manager loop is pretty sensitive to the
delays of exiting child processes. I found that it helps boot
times if we try to reap children as quickly as possible.
This patch changes event_queue_manager to call sigchilds_waiting
if it finds a signal has been received.
Signed-off-by: Olaf Kirch <okir@suse.de>
|
|
|
|
udevd had the ability to delay name resolution until the event, but this
was never exposed. Add a --resolve-names=late option to do so.
|
|
In certain cut-down situations such as an installer or inside the
initramfs, we simply don't have any kind of name service. While we
could use rules without OWNER or GROUP, it's better to have the same
rules as a full system and have udevd ignore those parts of the rules.
Adds a --resolve-names=never switch to udevd that has this effect.
|
|
udevd uses a rather old-fashioned way of handling signals
while waiting for input through select (ie by using an unnamed
pipe, to which the signal handler writes one byte for every signal
received). This is rather awkward and may potentially even block
if we receive more signals than the kernel's pipe buffer.
This patch replaces all of that with ppoll, which was designed
for this purpose.
It also removes the SA_RESTART flag from all installed signal
handlers, because otherwise the ppoll call would just be restarted
after handling eg a SIGCHLD.
Signed-off-by: Olaf Kirch <okir@suse.de>
|
|
Picked up by "gcc -Wextra".
udevadm.c:83: warning: initialized field overwritten
udevadm.c:83: warning: (near initialization for ‘cmds[2].help’)
This is just a cleanup. It doesn't change the code generated by gcc.
|
|
|
|
Scott found that the node /dev/pktcdvd can not be replaced by
/dev/pktcdvd/control by changing the rules, and re-trigger the
event. We used to create the new names before we cleaned up the
old ones, which can not work if we need to create subdir with
the same name.
|
|
Scott discovered that a changed rule, which renames a device node
leaves the old node name around as a symlink. So drop the reference
to the old name.
|
|
Since a while we change the database with a "test" run, but do not update
the node and symlinks. We need to "force" all the time, to keep things
in sync.
|
|
Scott mentioned that initramfs does not neccessarily have that
directory, so do not log an error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|