Age | Commit message (Collapse) | Author |
|
An important hunk was lost when merging systemd commit
adeba500 leading to broken global properties, issue #142.
This commit fixes this bug.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
In some cases (e.g. trimmed-down chroot or containers), libudev is the
only thing needed, with udevd and assorted programs totally useless
(e.g. because /dev is bind-mounted from the real one and managed
out-side the chroot/container).
Add an option to ./configure to enable/disable building the programs;
this option defaults to "enable", so that it is backward compatible with
existing build procedure, and because it by default makes sense to have
udevd et al.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Add missing defines so eudev builds for older kernels such as 2.6
Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
|
|
FTL is not necessarily present on all kernels so it's useful to
have an option to disable this.
Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
|
|
<sys/sysmacros.h> is no longer implicitly pulled in via <sys/types.h>
in glibc 2.24 and above.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
The getrandom() system call number is indeed 384 on ARM, but it is not
the same on ARM64. ARM64 uses the asm-generic headers, including for
system call numbers, so the getrandom() system call number on ARM64 is
278. This fixes runtime issues of eudev on ARM64, such as:
Populating /dev using udev: [ 6.186817] udevd[1204]: starting version 3.1.5
[ 6.191662] udevd[1204]: syscall 384
[ 6.195217] Code: aa0503e4 aa0603e5 aa0703e6 d4000001 (b13ffc1f)
[ 6.201291] CPU: 4 PID: 1204 Comm: udevd Not tainted 4.7.0+ #1
[ 6.207079] Hardware name: ARM Juno development board (r2) (DT)
[ 6.212954] task: ffff800976421900 task.stack: ffff800975610000
[ 6.218825] PC is at 0xffff97f12234
[ 6.222281] LR is at 0x41b15c
[ 6.225214] pc : [<0000ffff97f12234>] lr : [<000000000041b15c>] pstate: 80000000
[ 6.232544] sp : 0000ffffcf9b3870
[ 6.235828] x29: 0000ffffcf9b3870 x28: 0000000000428218
[ 6.241110] x27: 0000000000000000 x26: 000000000042a7e3
[ 6.246395] x25: 0000ffffcf9b39c8 x24: 0000000000428000
[ 6.251670] x23: 0000000000449000 x22: 0000000000449678
[ 6.256946] x21: 0000000000000010 x20: 0000000000449000
[ 6.262233] x19: 0000000000449678 x18: 0000000000000000
[ 6.267507] x17: 0000ffff97f12210 x16: 0000000000449440
[ 6.272779] x15: 0000ffff97e4f730 x14: 0000ffff98050cb8
[ 6.278060] x13: 000000000000033c x12: 00000000000004b4
[ 6.283331] x11: 0000000000000000 x10: 0101010101010101
[ 6.288604] x9 : 0000000000001010 x8 : 0000000000000180
[ 6.293882] x7 : ffffffffffffffff x6 : ffffffffffffffff
[ 6.299154] x5 : 00000000271e36c0 x4 : 0007061c00190d07
[ 6.304426] x3 : 00000000271e36d0 x2 : 0000000000000001
[ 6.309705] x1 : 0000000000000010 x0 : 0000000000449678
[ 6.314976]
[ 6.398734] sky2 0000:08:00.0 enp8s0: renamed from eth0
Reported-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Murray Calavera <murray.calavera@gmail.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
This reverts commit 75e930ed64b62ac7e684cbe3493963371904d55b.
This fixes issue #121.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Musl fixes
|
|
|
|
strndupa is a GNU extension, therefore it's not available
for all libc libraries (musl).
This patch is based on the one proposed by Emil Renner Berthing for
systemd [1].
[1] http://lists.freedesktop.org/archives/systemd-devel/2014-September/023190.html
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
|
mallinfo is not specified by POSIX or the C standards, therefore
it's not available for all libc libraries (musl).
Add the ability to disable mallinfo statistics.
Fixes:
selinux-util.c: In function ‘mac_selinux_init’:
selinux-util.c:70:25: error: storage size of ‘before_mallinfo’ isn’t known
struct mallinfo before_mallinfo, after_mallinfo;
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
|
We should not be receiving these anyway, but let's be correct.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
udev_monitor_new_from_netlink_fd
This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
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>
|
|
This reverts commit b2399d9b7222abe7db8ab4bc16e0efe3ccae4c42.
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:
https://github.com/systemd/systemd/commit/40e749b59ba49fb97c1f45859debe2a82bc9c9ef
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
Bring this in line with the rest of the codebase.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Simply query the size of the hashmap keeping all the worker contexts instead.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
This makes the code somewhat more readable.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
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>
|