Commit Graph

10846 Commits

Author SHA1 Message Date
Kay Sievers
97fbeb0b45 rules: block - add dasd to whitelist
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:52:06 -04:00
Cédric Delmas
224a128b0a Process cciss devices
Do not skip the persistent storage rules for cciss devices

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:50:17 -04:00
Bastien Nocera
e172381913 It's moved to the iio-sensor-proxy D-Bus service.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:45:23 -04:00
Peter Hutterer
a5cb5f0b4c Revert "hwdb: add a touchpad hwdb"
The main purpose of this hwdb was to tag touchpads that have the physical
trackstick buttons wired to the touchpad (Lenovo Carbon X1 3rd, Lenovo *50
series).  This hwdb is not required on kernels 4.0 and above, the kernel now
re-routes button presses through the trackstick's device node. Userspace does
not need to do anything.

See kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c.

This reverts commit 001a247324b44c0e0b8fdba41a6fc66e7465b8b6.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:28:05 -04:00
Kay Sievers
b5ac92fb85 rules: remove all power management from udev
It is not udev's task to apply any of these setting that way, or
from udev rules files. Things need to be sortet out in the kernel,
or explicit whitelist can possibly be added to the hardware database.
Until that is sorted out, and general agreement, udev is not
willing to maintain any such lists or power management settings
in general.

"Thanks for digging this out! I thought my Kinesis keyboard got broken
and ordered a new one, only to find out that the new one doesn't work
as well. I'm not sure whether we should start collecting a blacklist
of keyboards which don't work with USB autosuspend, or rather a
whitelist? Or revert this wholesale?"

  https://github.com/systemd/systemd/issues/340

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:20:01 -04:00
Alex Crawford
73c2d3cd6d rules: re-add cciss rules
The original commit (1aff206) doesn't explain why these were removed.
This adds them back since they are in fact needed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:17:36 -04:00
Alex Crawford
03638dd242 rules: whitelist xvd* devices
Xen disks need to be whitelisted as well.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:17:13 -04:00
Ed Swierk
19d2ceea61 Add /dev/xvd* to 60-persistent-storage whitelist Without this, systemd-udevd does not create persistent storage symlinks for xen block devices.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:16:26 -04:00
David Mohr
be3ceedb88 udev: Bring back persistant storage symlinks for bcache
https://bugs.debian.org/787367

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:15:57 -04:00
Tom Gundersen
0617e636ab rules: restore block watch after CHANGE events
When processing an event, the watch is disabled, make sure it is restorted after
a CHANGE event has been processed.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:14:41 -04:00
Tom Gundersen
ebcaf4b310 rules: fix typo in block watch rule
The intention was to turn this rule from using a blacklist to a whitelist, but
there was a stray '!'.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-07-20 07:13:39 -04:00
Anthony G. Basile
c9ed0f0dc6 configure.ac: bump 3.1.2 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-19 12:33:33 -04:00
Anthony G. Basile
5e11fe2da4 Rename mkdir_p -> udev_mkdir_p to avoid symbol collisions.
While usptream doesn't support a static libudev.a, we will try to
do so.  However, mkdir_p() is used in lvm2 and util-linux, so
to avoid the collision, we rename it to udev_mkdir_p().  See:

https://bugs.gentoo.org/show_bug.cgi?id=520450

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 14:11:59 -04:00
Chris Clayton
52a4d0c0d5 udevd: fix REMOVE handling
The original upstream commit is at

http://cgit.freedesktop.org/systemd/systemd/commit/?id=107f2e2526d476c6cc9b81a690391c111027d641

This was reworked by Chris Clayton for eudev.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 13:22:13 -04:00
Anthony G. Basile
7061de26fa Revert "udev: don't close std{in,out,err}"
This reverts commit b2399d9b72.

This solves issue #108.  While upstream also reverted this commit,
they did so using functions in terminal-util.c.  We could import
that file and those functions but for such a small commit, its not
worth it.   We may do so at some future time if there are further
gains.  See:

40e749b59b

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-18 12:32:17 -04:00
Anthony G. Basile
3c49a3776a configure.ac: bump 3.1.1 = upstream 220
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-05 10:35:38 -04:00
Anthony G. Basile
2eba1b8055 80-net-name-slot.rules: restored for issue #117.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-06-02 10:10:45 -04:00
Anthony G. Basile
ebb37f6a47 configure.ac: add --enable-hwdb option. Address issue #111.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:50:28 -04:00
Anthony G. Basile
53997d40dd configure.ac: slightly better organize xsltproc stuff
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:36:16 -04:00
Anthony G. Basile
047416ff0f configure.ac: fix --enable-manpages. Fixes issue #109.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 08:25:58 -04:00
blueness
0dd8f3848e Merge pull request #116 from ahills/master
Update project URL in README
2015-05-30 07:23:28 -04:00
Anthony G. Basile
71640ee498 man: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 07:09:14 -04:00
Anthony G. Basile
5803c30ed2 configure.ac: bump udev to 220 and eudev to 3.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-30 06:53:04 -04:00
Anthony G. Basile
cca9d72d96 random-util.c: remove <sys/auxv.h> missing in uClibc
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-29 19:19:29 -04:00
Anthony G. Basile
63126619bb src/shared/missing.h: O_PATH and AT_EMPTY_PATH missing in uClibc's <fcntl.h>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-29 19:15:25 -04:00
Anthony G. Basile
10647c881b src/shared/util.h: update qsort_safe() for musl
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 12:42:05 -04:00
Jason S. McMullan
cf427188ad udev/net_id: Only read the first 64 bytes of PCI config space
The original code used fread(), which on some libc implementions
(ie glibc 2.17) would pre-read a full 4K (PAGE_SIZE) of the
PCI config space, when only 64 bytes were requested.

I have recently come across PCIe hardware which responds with
Completion Timeouts when accesses above 256 bytes are attempted.

This can cause server systems with GHES/AEPI support to cause
and immediate kernel panic due to the failed PCI transaction.

This change replaces the buffered fread() with an explict
unbuffered read() of 64 bytes, which corrects this issue by
only reading the guaranteed first 64 bytes of PCIe config space.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 09:39:35 -04:00
Anthony G. Basile
1713bd21e6 src/shared/path-util.c: import prefix_root() from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 09:38:31 -04:00
Lennart Poettering
8943501993 nspawn: finish user namespace support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 09:23:27 -04:00
Tom Gundersen
9aee6bf164 udevd: main - use _exit() when daemonizing
Makes it a bit clearer what is going on, rather than jumping to the end of main().

No functional change.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:44:53 -04:00
Anthony G. Basile
b831062ea7 Skip 'udevd: move file descriptors to Manager' and 'udevd: init/exit the builtins in manager_new/free'
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:32:14 -04:00
Lennart Poettering
c87734cd27 ata_id: drop spurious space
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:28:02 -04:00
Anthony G. Basile
04d6ad05a3 Skip 'udevd: queue - update queue state when events are queued/freed'
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:25:14 -04:00
Tom Gundersen
a5be4ae907 udevd: on_worker - distinguish between EINTR and EAGAIN
EAGAIN means there are no more messages to read, so give up. EINTR means we got interrupted
reading a message, so try again.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:21:49 -04:00
Anthony G. Basile
8ab818626d src/shared/util.h: import loop_write() from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 08:16:14 -04:00
Tom Gundersen
233b58f3ac udevd: worker - use loop_write() rather than send()
When notifying the main daemon about event completion, make sure the message is sent
successfully, and not interrupted.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 07:46:12 -04:00
Tom Gundersen
b27de33448 udev-ctrl: make _unref() always return NULL
Bring this in line with the rest of the codebase.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 07:41:28 -04:00
Anthony G. Basile
f8f26ec383 Skip 'udevd: pass a Manager objcet to event handlers'
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 07:40:09 -04:00
Anthony G. Basile
52ad09b0bc Skip 'udevd: explicitly read out uevents we create ourselves'
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-27 07:39:20 -04:00
Tom Gundersen
fb2906b467 udevd: remove stale comment
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 17:09:58 -04:00
Tom Gundersen
c0a12c12ba udevd: explicitly update queue file before answering to ping
This avoids updating the flag files twice for every loop, and also removes another dependency
in the main-loop, so we are freer to reshufle it as we want.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 17:05:57 -04:00
Anthony G. Basile
a23afd63bf Skip 'udevd: move to sd-event-style event handlers'
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 16:57:29 -04:00
Tom Gundersen
bed01621a6 udevd: make udev_ctrl_connection global
This allows us to simplify the ctrl_msg handler. Eventually all this global state should move to
a Manager object or so.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 16:27:38 -04:00
Torstein Husebø
7be67389a9 treewide: Correct typos and spell plural of bus consistent
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 16:24:16 -04:00
Thomas Hindoe Paaboel Andersen
7da1cec992 udevd: remove unused function
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 16:19:49 -04:00
Tom Gundersen
8d8a4087fb udevd: don't explicitly count the number of workers
Simply query the size of the hashmap keeping all the worker contexts instead.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 16:17:39 -04:00
Tom Gundersen
7d5298810a udevd: keep workers in a hashmap rather than a list
This makes the code somewhat more readable.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 13:18:16 -04:00
Tom Gundersen
1fc303749c udevd: worker - drop reference counting
Make the worker context have the same life-span as the worker process. It is created on fork()
and free'd on SIGCHLD.

The change means that we can get worker_returned() for a worker context that is no longer around,
this is not a problem and we can just drop the message. The only use for worker_returned() is to
know to reschedule events to workers that are still around, so if the worker has already exited
it is not important to keep track of. We still print a debug statement in this case to be on the
safe side.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 13:10:27 -04:00
David Herrmann
adf171757d udev: fix weird coding-style
Eeeew!

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 13:09:29 -04:00
Tom Gundersen
dae71aedd2 udevd: worker - allow passing NULL to worker_unref()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-26 13:07:39 -04:00