summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-04path-util: fix fstat fallback in fd_is_mount_pointThomas Hindoe Paaboel Andersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-04sysctl: minor simplificationsLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-04path-util: make use of "mnt_id" field exported in /proc/self/fdinfo/<fd> to ↵Lennart Poettering
test for mount points Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-04udevd: skip fix REMOVE handlingAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-04util: Fix assertion in split() on missing 'Martin Pitt
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
2015-05-03shared/hashmap: normalize whitespaceZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: worker - log if worker result cannot be sentTom Gundersen
If the main daemon is not notified about a worker finishing an event the refcounting of the worker struct will be wrong, and we will lose track of the number of children we have to wait for. This should not happen, but if it does we better complain loudly about it. Worst case udev will wait for 30 seconsd at shutdown waiting for nonexistent workers. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: worker - warn if unknown worker returnsTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03src/udev/udevd.c: remove initializer for struct for gcc-4.5.Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: worker - let the kernel attach the sender pidTom Gundersen
No need to include this explicitly, just use SCM_CREDENTIALS. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: don't unref worker objects on SIGSTOP/SIGCONTTom Gundersen
We should not be receiving these anyway, but let's be correct. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: warn if we receive SIGCHLD from untracked workerTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevd: improve logging in SIGCHLD handlingTom Gundersen
Remove some redundant logging, and reduce the log-level in most cases. The only case that is really critical is if a worker failed while hanlding an event, so keep that at error level.
2015-05-03src/shared/util.h: import xsprintf() from upstream.Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: event - update tags before writing out dbTom Gundersen
The old tags are read from the db when deciding which tags to clear, make sure we don't write out the new db before the old one has been read. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: Fix ping timeout when settle timeout is 0Nir Soffer
When running udevadm settle --timeout=0, the ping always times out, and udevadm will return 0 without checking the queue state. (David: Use a reasonable timeout to still get the barrier provided by ctrl-ping) Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udevadm: enclose invocation of unlinkat() with a (void) castLennart Poettering
Let's make Coverity happy about this one. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: settle should return immediately when timeout is 0Nir Soffer
udevadm manual says: A value of 0 will check if the queue is empty and always return immediately. However, currently we ignore the deadline if the value is 0, and wait without any limit. Zero timeout behaved according to the documentation until commit ead7c62ab7 (udevadm: settle - kill alarm()). Looking at this patch, it seems that the behavior change was unintended. This patch restores the documented behavior. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev-builtin-usb_id: fix inverted conditionZbigniew Jędrzejewski-Szmek
Fix for 4beac74e69. Thanks, Ronny! Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev-builtin-usb_id: simplificationZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: downgrade a few warnings to debug messagesLennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=89885 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03input_id: Identify scroll-wheel device on Trust TB7300 tablet as keyboardHans de Goede
The Trust TB7300 (relabelled Waltop?) tablet has a scrollwheel which shows up as a /dev/input/event# node all by itself. Currently input_id does not set any ID_INPUT_FOO attr on this causing it it to not be recognized by Xorg / libinput. This commit fixes this by marking it with ID_INPUT_KEY. Reported-by: Sjoerd Timmer <themba@randomdata.nl> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: input_id: Make test_pointer / test_keys return if they've found anythingHans de Goede
Make test_pointer / test_keys return a boolean indicating whether or not they've set any properties on the device. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: input_id: whitespace fixesPeter Hutterer
Remove whitespaces before opening parentheses, mostly before test_bit. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03libudev: monitor - fix typo in log messageTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03libudev: monitor - clarify log messagesTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03libudev/libudev-enumerate.c: do not match only on initialized devices by defaultAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03libudev/libudev-enumerate.c: do not reduce to a thin wrapper around sd-deviceAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03rules: Add more firewire properties for sound, to be closer to USB and PCIAdam Goode
USB and PCI soundcards have a nice set of ID_* properties. It would be handy for firewire soundcards to have the same. Note that this removes the explicit setting of ID_ID in the firewire conditional. Because we are now setting ID_SERIAL, ID_ID will come from later in the file. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03rules: Don't use ALSA card id in ID_IDAdam Goode
The ALSA id sysattr is generated by the sound subsystem and is not a stable identifier. It is generated though some string manipulation then made unique if there is a conflict. This means that it is enumeration-dependent and shouldn't be used for ID_ID. If ID_ID is supposed to be system-unique, it is not already since for firewire it is generated from the guid and there are broken firewire devices that have duplicate guids across devices. This is tracked for PulseAudio at https://bugs.freedesktop.org/show_bug.cgi?id=90129. This is essentially a revert of systemd ed1b2d9fc7d5c5bfe2a67b0b8ff9e5ea8694268e. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: coalesce same pointingstick entries into oneZbigniew Jędrzejewski-Szmek
Multiple models in the same hardware series are likely to have similar specs. We should use organization similar to hwdb/60-evdev. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: hwdb: Add trackpoint sensitivity settings for Lenovo X240 and 540pHans de Goede
Like the T440s these need the sensitity to be set significantly higher then the default of 128 for the trackpoint to be usable. Like with the T440s 200 seems to be a good value to get a reasonable but not too high sensitivity. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: fix typo - "sort by by..." -> "sort by..."Peter Hutterer
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: add HP X1000 DPI infoPeter Hutterer
Device name is PixArt, but it's sold as a HP brand. https://bugs.freedesktop.org/show_bug.cgi?id=90142 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: add Chromebook pixel (2015) resolution fixBenjamin Tissoires
The atmel driver sets a default resolution of 20 for each touchpads it creates. On this model, 10 is more appropriate. The resolution is not set for the touchscreen by the kernel, so match the name to both touchpad and touchscreen. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: add evdev entry for the Lenovo X230 series touchpadBenjamin Tissoires
The Lenovo X230 advertize a vertical resolution of 136, which gives a true size of 31 mm. The actual physical size of the touchpad is 40 mm, so override the resolution to 100. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: Add entries for the pointingstick on 2 Dell LatitudesHans de Goede
The pointingstick of the Dell Latitude E6400 is somewhat slow by default, whereas the pointingstick of the Dell Latitude D620 is much too fast by default, set POINTINGSTICK_CONST_ACCEL for both of them to adjust for this. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03hwdb: Add entries for the trackpoint on 2 ThinkpadsHans de Goede
Lenovo has changed the sensitivity of the trackpoint on the x240 / T440s / T540 generation of Thinkpads, making them somewhat insensitive by default, add a hwdb entry to tweak the sensitivity setting. The ThinkPad X200s is way way too slow by default and unless you push the trackpoint quite hard only sends delta events in the 1-2 range, tweak the sensitivity to make it send a wider range of deltas and apply a const accel factor to make it have a more reasonable speed by default. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: keyboard-builtin: Add support for setting IBM trackpoint sensitivityHans de Goede
IBM / Lenovo trackpoints allow specifying a sensitivity setting through a ps/2 command, which changes the range of the deltas sent when using the trackpoint. On some models with normal usage only deltas of 1 or 2 are send, resulting in there only being 2 mouse cursor movement speeds, rather than the expected fluid scale. Changing the sensitivity to a higher level than the bootup default fixes this. This commit adds support for setting a POINTINGSTICK_SENSITIVITY value in hwdb to allow changing the sensitivity on boot through udev / hwdb. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-05-03udev: Add hwdb file for setting pointingstick propertiesHans de Goede
There is quite a wide spread in the delta events generated by pointingsticks, some generate deltas of 1-2 under normal use, while others generate deltas from 1-20. This commit adds a hwdb file which allows specifying a per model POINTINGSTICK_CONST_ACCEL value which can be used by the userspace input stack to normalize the deltas so that all pointingsticks get the same feeling ootb. The hwdb matching re-uses the existing 60-evdev.rules. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-17hwdb: Fix wireless switch on Dell LatitudeMartin Pitt
It does not generate a release event. https://launchpad.net/bugs/1441849 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-15Ronny Chevalier <chevalier.ronny@gmail.com>shared: add terminal-util.[ch]Ronny Chevalier
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-14test: test only udev and libudev.Anthony G. Basile
2015-04-14shared: add random-util.[ch]Ronny Chevalier
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-14shared: add process-util.[ch]Ronny Chevalier
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-14util: when unescaping C escape sequences support C++11 \u andLennart Poettering
\U unicode literals We simply recode them in utf8. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-12path-util: fix more path_is_mount e792e890f falloutLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-12path-util: don't eat up ENOENT in path_is_mount_point()Lennart Poettering
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>
2015-04-12path-util: make sure fd_is_mount_point() returns true for root directoryLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-04-12src/shared/Makefile.am: fix make dist-checkAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>