Age | Commit message (Collapse) | Author |
|
Add missing defines so eudev builds for older kernels such as 2.6
Signed-off-by: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Various cleanups, be stricter when parsing unit paths.
Most importantly: return the root slice "-.slice" when asked for slice
of paths that contain no slice component.
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>
|
|
test for mount points
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
When parsing a unit with a trailing slash after an escaped line break, like
ExecStart=/bin/echo 'foo \
bar'
the split() function (through config_parse()) asserted and crashed pid 1:
Assertion 'current[*l + 1] == quotechars[0]' failed at ../src/shared/util.c:583, function split(). Aborting.
Fix this by returning an error in this case ("trailing garbage").
Add corresponding test case. Also fix the missing "unit" argument of
config_parse_exec() in the comment.
https://launchpad.net/bugs/1447243
|
|
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>
|
|
\U unicode literals
We simply recode them in utf8.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
There's no reason to eat up ENOENT, it should be OK to simply report the
error back.
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>
|
|
mount point
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
We _always_ return NULL from destructors to allow direct assignments to
the variable holding the object. Especially on hashmaps, which treat NULL
as empty hashmap, this is pretty neat.
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>
|
|
All callers look at the return value anyway.
|
|
We always return NULL/invalid-object from destructors, fix strv_free() to
do the same.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
input_id already (tries to) tag accelerometers as such, but this only works
for absolute accelerometers. Recent kernels mark accelerometers through an
input prop. Trust that prop and always tag devices with it with
ID_INPUT_ACCELEROMETER.
Note that detection by the prop bit works the same as the existing detection
and will ensure that no other tags get set on the device.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Also referred to as trackpoint, trackstick. These are marked by recent kernels
through an input prop. Forward that prop as udev property so userspace can
easily determine whether there is a pointing stick present.
These devices were previously marked as ID_INPUT_MOUSE, for backwards
compatibility we keep that in place, the new property is an addition.y
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
... and make path_equal() a simple wrapper around it.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
If you've got SELinux policy loaded, label_hnd is your labeling handle.
When systemd is shutting down, we free that handle via mac_selinux_finish().
But: switch_root() calls mkdir_p_label(), which tries to look up a label
using that freed handle, and so we get a bunch of garbage and eventually
SEGV in libselinux.
(This doesn't happen in the switch-root from initramfs to real root because
there's no SELinux policy loaded in initramfs, so label_hnd is NULL and we
never attempt any lookups.)
So: make sure that mac_selinux_finish() actually sets label_hnd to NULL, so
nobody tries to use it after it becomes invalid.
https://bugzilla.redhat.com/show_bug.cgi?id=1185604
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
It certainly is everywhere on Linux, but as a courtesy
to people doing some strange cross-compilation, check
that the assumption holds.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|