Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
src/udev/udev-rules.c: In function 'add_rule':
src/udev/udev-rules.c:1078:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'int' [-Wformat=]
log_error("invalid key/value pair in file %s on line %u,"
^
|
|
systemd-udevd[6260]: invalid key/value pair in file /usr/lib/udev/rules.d/60-ffado.rules on line 46,starting at character 84 ('#')
|
|
A regression introduced when we moved to systemd's logging is that the only
way to adjust the log-level of the udev daemon is via the env var, kernel
commandline or the commandline.
This reintroduces support for specifying this in the configuration file.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
composed one
|
|
|
|
udev_device_get_subsystem() may return NULL if no subsystem could be
figured out by libudev. This might be due to OOM or if the device
disconnected between the udev_device_new() call and
udev_device_get_subsystem(). Therefore, we need to handle subsystem==NULL
safely.
Instead of testing for it in each helper, we treat subsystem==NULL as
empty subsystem in match_subsystem().
Backtrace of udev_enumerate with an input-device disconnecting in exactly
this time-frame:
(gdb) bt
#0 0x00007ffff569dc24 in strnlen () from /usr/lib/libc.so.6
#1 0x00007ffff56d9e04 in fnmatch@@GLIBC_2.2.5 () from /usr/lib/libc.so.6
#2 0x00007ffff5beb83d in match_subsystem (udev_enumerate=0x7a05f0, subsystem=0x0) at src/libudev/libudev-enumerate.c:727
#3 0x00007ffff5bebb30 in parent_add_child (enumerate=enumerate@entry=0x7a05f0, path=<optimized out>) at src/libudev/libudev-enumerate.c:834
#4 0x00007ffff5bebc3f in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x7a56b0 "/sys/devices/<shortened>/input/input97", maxdepth=maxdepth@entry=254) at src/libudev/libudev-enumerate.c:866
#5 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x79e8c0 "/sys/devices/<shortened>/input", maxdepth=maxdepth@entry=255) at src/libudev/libudev-enumerate.c:868
#6 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=path@entry=0x753190 "/sys/devices/<shortened>", maxdepth=maxdepth@entry=256) at src/libudev/libudev-enumerate.c:868
#7 0x00007ffff5bec7df in scan_devices_children (enumerate=0x7a05f0) at src/libudev/libudev-enumerate.c:882
#8 udev_enumerate_scan_devices (udev_enumerate=udev_enumerate@entry=0x7a05f0) at src/libudev/libudev-enumerate.c:919
#9 0x00007ffff5df8777 in <random_caller> () at some/file.c:181
|
|
We need to free udev-devices again if they don't match. Funny that no-one
noticed it yet since valgrind is quite verbose about it.
Fix it and free non-matching devices.
|
|
If a realloc() happens in syspath_add(), the move_later pointer could
point to an invalid memory region.
Let move_later store the array index, instead of the pointer to the
entry.
|
|
|
|
|
|
|
|
|
|
Otherwise systemd-udevd will rename on "change" and "move" events,
resulting in weird renames in combination with biosdevname
systemd-udevd[355]: renamed network interface eth0 to em1
systemd-udevd[355]: renamed network interface eth1 to p3p2
systemd-udevd[357]: renamed network interface eth0 to p3p1
systemd-udevd[429]: renamed network interface p3p2 to ens3f1
systemd-udevd[428]: renamed network interface p3p1 to ens3f0
systemd-udevd[426]: renamed network interface em1 to enp63s0
or
systemd-udevd[356]: renamed network interface eth0 to em1
systemd-udevd[356]: renamed network interface eth0 to p3p1
systemd-udevd[420]: renamed network interface p3p1 to ens3f0
systemd-udevd[418]: renamed network interface em1 to enp63s0
systemd-udevd[421]: renamed network interface eth1 to p3p1
|
|
|
|
We need to override the TOUCHPAD_TOGGLE to F21 to make it useful under X, as
for other models.
|
|
Without this, the hwdb trie gets mis-sorted to match the more specific rules
first, as ":pvr" is lexicographically after ":pn". So ensure that all our
matches have some ":pn" match to avoid this trap.
|
|
We actually want to match the product name, "pn:" makes no sense.
|
|
Spaces get dropped from DMI modaliases. Replace them with '*' to make them
robust against future changes in space escaping.
|
|
Spaces are dropped from vendor and product names in DMI modaliases, so a match
like "svnDell Inc.:" will never happen. Also, some machines use "Dell", some
"Dell Inc", some "Dell Inc.", so just match on "Dell*" to avoid all these
traps.
https://launchpad.net/bugs/1218433
|
|
Don't use "KEYBOARD_KEY_xx=!" assignments (i. e. only enabling force-release)
if more general matches already explicitly set a key code before, to not
override the previously set value.
https://launchpad.net/bugs/1218433
|
|
By Albrecht Kolthoff <kolthoff@gmx.net> via linux-hotplug@.
|
|
https://launchpad.net/bugs/1203853
|
|
I'm using Ubuntu 13.04 on a Samsung Series 5 computer and found that that
Fn hotkeys does not work.
|
|
Information supplied by Ludvig <enthymeme@lavabit.com>.
|
|
|
|
<dvdhrm> kay, hwdb/60-keyboard.hwdb line 147 it says KEYBOARD_KEY_ee=screenlock"
with a " at the end. I guess that's a typo?
|
|
|
|
KEY_ definitions
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=67651
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=66178
|
|
mktime is not used anywhere in the code, and the stock configure
check for mktime invokes UB, so lets just remove it.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
while theoretically a nice interface, qsort_r on GLIBC was
implemented with a prototype that shuffles the argument order
around when compared to the traditional BSD implementations,
yielding in 2 separate incompatible implementations.
even worse, the arguments are all of pointer type so one would
not even notice that the order is wrong and so this would yield
in crashes or silent memory corruption.
thus musl does not implement it, because configure scripts would
check for its existance and use it unconditionally, even when
assuming the BSD version.
a more portable solution is to use TLS via __thread, which any
modern GCC should provide. (even 3.4.6 on x86/x86_64 does so).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
sys/poll.h is a legacy alias used by glibc.
according to POSIX #include <poll.h> is correct.
on GLIBC, the POSIX header includes sys/poll.h, so everything
continues working as it should.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
this is a glibc specific alias for realpath(path, NULL).
to be portable, we need to use the real thing which is even less
verbose.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
mktime is not used anywhere in the code, and the stock configure
check for mktime invokes UB, so lets just remove it.
closes #71
|
|
strndupa() allocates memory using alloca() which is dangerous and
non-conformant. Some libcs, like musl, deliberately do not implement
it. Instead we allocate a buffer on the stack which is cleaned up
on return.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
If we pass a variable to open()'s flags parameter it really wants a mode
parameter too, otherwise some gcc version whine. Hence, pass 0 in that
case.
|
|
We reorder the functions prototypes and definitions to match
upstream as in commit aa417a4d83999f6d7f092161d5c411b8cbce9977.
The order was lost when that commit was revert and the functions
re-introduced in later commits.
Preserving the order helps to better track upstream changes when
doing a diff between files.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
When a new network iface device is added, scan through the list of rules to see if its
kernel-assigned name is used as a target for another device. If so, and said target device
is not this device, rename it to a temporary interface name. Then rename the device in
accordance with any rename rules that may apply to this device, if applicable.
The temporary name assigned is the basename of the interface with a numeric compoment which is
close to the inverse of the numeric id (127 - id#). This should provide a more user-friendly
output than the old 'rename#' behaviour, when there is no final target name for the iface.
This proactive temporary rename will prevent cases where old-style rule-generator rules are used
and a target NAME= is set for one iface, assigning it to the iface name used by a second iface,
and that second iface has no rename rule to apply. The original rename code would be blocked
due to the conflict and time out when attempting to rename, leaving the interface assigned to the
temporary 'rename[id#]' name and/or failing to rename other ifaces in accordance with the existing
rules. This is a corner case that only occurrs when 75-persistent-net-generator.rules or the
write_net_rules script it 'IMPORTS' fails to generate a new rule and rename the interface and
there is no other interface-renaming rules that apply.
There may also be performance benefits to renaming ifaces early, but no benchmarks have been
run to confirm this.
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|
|
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
|