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

292 Commits

Author SHA1 Message Date
Kay Sievers
722af2d0d3 man: fix grammar
Reported-by: Robert Peterson <rpeterso@redhat.com>
2009-01-25 21:21:43 +01:00
Kay Sievers
c2de781ef0 udevadm: settle - fix typo 2009-01-23 02:19:12 +01:00
Kay Sievers
5db88229d1 udevd: add back SA_RESTART
<Keybuk> poll, select, ppoll, pselect, epoll, etc. are *explicitly* NOT restarted in case of signal
<kay> ok
2009-01-21 18:55:59 +01:00
Kay Sievers
6469c77216 split up long line 2009-01-21 15:11:38 +01:00
Kay Sievers
4b0faa2aa0 Merge commit '9032f119f07ad3b5116b3d4858816d851d4127de' 2009-01-21 14:43:22 +01:00
Kay Sievers
2c7b88c4a5 Merge commit '5f03ed8a56d308af72db8a48ab66ed68667af2c6'
Conflicts:
	udev/udevd.c
2009-01-21 14:42:30 +01:00
Kay Sievers
c807ad918c increase netif renaming timeout from 30 to 90 seconds 2009-01-21 11:17:58 +01:00
Olaf Kirch
d1cc6562f3 reap children faster
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>
2009-01-21 11:17:11 +01:00
Kay Sievers
e9a77fd828 open-code pollfd setup 2009-01-21 11:09:27 +01:00
Scott James Remnant
9032f119f0 Expose delayed name resolution
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.
2009-01-20 21:36:09 +00:00
Scott James Remnant
5f03ed8a56 Allow user and group lookup to be disabled.
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.
2009-01-20 21:33:02 +00:00
Olaf Kirch
3210a72ba3 udevd: use ppoll instead of signal pipes
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>
2009-01-20 12:49:20 +01:00
Alan Jenkins
a3ab20722d remove stray initializer
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.
2009-01-16 21:33:33 +01:00
Alan Jenkins
e5e641518b man: typo fixes 2009-01-16 21:32:25 +01:00
Kay Sievers
fc7d16f993 cleanup old names before creating the new names
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.
2009-01-16 21:15:53 +01:00
Kay Sievers
8257730d39 remove name from index if the node name has changed
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.
2009-01-16 21:14:13 +01:00
Kay Sievers
ec2dd02e2a udevadm: test - remove --force option
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.
2009-01-15 20:20:16 +01:00
Kay Sievers
92e52e2fd1 do not complain about a missing /etc/udev/rules.d/
Scott mentioned that initramfs does not neccessarily have that
directory, so do not log an error.
2009-01-15 17:52:17 +01:00
Kay Sievers
affed87af1 libudev: use 4096 bytes buffer for attribute reading 2009-01-14 21:54:31 +01:00
Kay Sievers
56c141eceb libudev: test - add udev_device_get_property_value() 2009-01-06 16:52:40 +01:00
Kay Sievers
3d7b2831cd libudev: device - add udev_device_get_property_value() 2009-01-06 00:26:28 +01:00
Kay Sievers
b620292bd2 udevadm: s/udevinfo/udevadm info/ 2009-01-05 12:28:09 +01:00
Kay Sievers
0c057e9c75 enable skipping of "naming-only" rules 2009-01-05 02:55:37 +01:00
Kay Sievers
58d882a6d7 libudev: subsytem -> subsystem 2009-01-03 15:24:59 +01:00
Marcel Holtmann
61ee8cc92d libudev: device - remove udev_device_get_parent_with_subsystem 2009-01-03 15:12:28 +01:00
Marcel Holtmann
883012d49b libudev: device - lookup subsystem and devtype together 2009-01-03 15:12:17 +01:00
Kay Sievers
b92511747a libudev: device - read "uevent" only if info is not already loaded 2009-01-03 04:55:15 +01:00
Michal Soltys
db71b500b2 man: udev - update NAME assignment 2009-01-02 14:07:54 +01:00
Marcel Holtmann
bf8b2ae177 libudev: device - add devtype support 2009-01-02 04:37:04 +01:00
Kay Sievers
f089350234 libudev: enumerate - add lookup by property 2008-12-29 07:42:19 +01:00
Kay Sievers
64be143742 require non-SYSFS_DEPRECATED 2.6.20+ kernel 2008-12-29 06:04:09 +01:00
Kay Sievers
1028fe14b6 if needed, store database entries also for devices which do not have a device node 2008-12-28 01:49:01 +01:00
Kay Sievers
c4e63d5412 "'/sbin/modprobe abnormal' exit" - also print program options 2008-12-20 00:03:53 +01:00
Kay Sievers
4f06aaa9d8 libudev: include <sys/types.h> 2008-12-16 14:48:33 +01:00
Kay Sievers
b76ad2e537 udevadm: settle - allow --timeout=0 and --quiet 2008-12-08 16:48:54 +01:00
Kay Sievers
5d89ef7bf9 make: do not delete autotools generated file with distclean
[...] running the command
`make maintainer-clean' should not delete `configure' even if
`configure' can be remade using a rule in the Makefile.  More
generally, `make maintainer-clean' should not delete anything that
needs to exist in order to run `configure' and then begin to build
the program.  This is the only exception; `maintainer-clean' should
delete everything else that can be rebuilt.
2008-12-06 04:03:08 +01:00
Kay Sievers
e2c9d3c36f fix network interface name swapping 2008-12-02 01:04:23 +01:00
Kay Sievers
ae2d346642 silence PHYSDEV* warning for WAIT_FOR* rules 2008-11-24 21:24:04 +01:00
Kay Sievers
f408fd919a fix handling of swapping node name with symlink name 2008-11-24 02:21:12 +01:00
Gabor Z. Papp
28673dd75c include errno.h in sysdeps.h 2008-11-21 04:19:11 +01:00
Kay Sievers
bbfaec2b2f libudev: accept NULL whitelist in util_replace_chars() 2008-11-20 02:43:34 +01:00
Kay Sievers
5375c80eba fix $links substitution for devices without any link
Reported-by: Michel Hermier <michel.hermier@gmail.com>
2008-11-17 15:24:47 +01:00
Kay Sievers
c969f88062 udevd: fix cleanup of /dev/.udev/uevent_seqnum 2008-11-17 14:43:58 +01:00
Kay Sievers
096e59edc9 limit $attr(<symlink>) magic to well-known links only 2008-11-17 02:01:37 +01:00
Sergey Vlasov
56116314d1 udevadm: fix option parsing breakage with klibc
The klibc implementation of getopt_long() behaves slightly different
from the glibc one - in particular, it treats the change of the option
string argument between invocations as start of parsing a different
command line, and resets its state.  However, the udevadm code
expected getopt_long() invocations in subcommands to continue parsing
the rest of command line after initial options has been parsed at the
top level; with klibc this broke, causing all udevadm subcommands to
stop recognizing their options.

Instead of relying on the glibc behavior, reset the getopt_long()
state properly before invoking the subcommand handler: move argv to
point to the subcommand name, decrease argc appropriately, and set
optind = 0.  This also fixes a minor bug visible with glibc - without
setting optind = 0 all getopt_long() calls in subcommand handlers were
behaving as if "+" was specified as the first character of the option
string (which disables option reordering), because that state was set
by the first getopt_long() call at the top level, and was not reset
when parsing subcommand options.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
2008-11-15 02:01:15 +01:00
Kay Sievers
f454ecf754 libudev: device - handle disk "device" link for partitions in deprecated sysfs layout
Thanks to Mikhail Kolesnik <mike@openbunker.org> for finding this.
2008-11-14 18:26:49 +01:00
Kay Sievers
949075dbbd remove len == 0 check, the index root is always '\0' 2008-11-13 18:21:28 +01:00
Kay Sievers
50025605e0 udevadm: info - unify -V and --version 2008-11-13 07:31:04 +01:00
Kay Sievers
95d61c2745 set errno = ENOSYS in inotify stub 2008-11-13 01:52:33 +01:00
Kay Sievers
023ed7b0a3 merge trie nodes, childs and root into a single array 2008-11-13 00:52:12 +01:00