summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-17udev: fix NULL-ptr derefDavid Herrmann
Make sure we properly validate the return value of udev_device_get_sysattr_value(). It might be NULL for several reasons. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: Add builtin/rule to export evdev information as udev propertiesCarlos Garnacho
This rule is only run on tablet/touchscreen devices, and extracts their size in millimeters, as it can be found out through their struct input_absinfo. The first usecase is exporting device size from tablets/touchscreens. This may be useful to separate policy and application at the time of mapping these devices to the available outputs in windowing environments that don't offer that information as readily (eg. Wayland). This way the compositor can stay deterministic, and the mix-and-match heuristics are performed outside. Conceivably, size/resolution information can be changed through EVIOCSABS anywhere else, but we're only interested in values prior to any calibration, this rule is thus only run on "add", and no tracking of changes is performed. This should only remain a problem if calibration were automatically applied by an earlier udev rule (read: don't). v2: Folded rationale into commit log, made a builtin, set properties on device nodes themselves v3: Use inline function instead of macro for mm. size calculation, use DECIMAL_STR_MAX, other code style issues v4: Made rule more selective v5: Minor style issues, renamed to a more generic builtin, refined rule further. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udev: make use of new one_zero() helper where appropriateLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17udevadm: don't hit an assert when obsolete parameters are passedLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=1178051 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwbd: add click angle for the Logitech M325Peter Hutterer
This device has 18 stops per rotation == 20 degree angle. Advertised as "Micro-precise scrolling" Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: add MOUSE_WHEEL_CLICK_ANGLE as propertyPeter Hutterer
Most mice have a wheel click angle of 15 degrees, i.e. 24 clicks per full wheel rotation. Some mice, like the Logitech M325 have a larger angle. To allow userspace to make use of that knowledge, add a property to the hwdb. This allows for better predictive scrolling. e.g. a mouse that has a smaller click angle will scroll faster, with this value you can accommodate this where needed. Likewise, using "half turn of the wheel" or "full turn of the wheel" as a UI element becomes possible. This addition is mainly driven by libinput 0.8, having the angle enables libinput to provide an API that distinguishes between a physical distance (like touchpad scrolling does) and discrete steps (wheel clicks). Callers can choose what they prefer based on the device. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: add Kay's Laser Mouse to the dpi databaseLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: add missing line between the G400 entriesPeter Hutterer
Error, DATA expected but got 'mouse:usb:v046dpc24c:name:Logitech G400s Optical Gaming Mouse:' in '/etc/udev/hwdb.d/70-mouse.hwdb': Error, MATCH expected but got ' MOUSE_DPI=400@1000 *800@1000 2000@1000 4000@1000' in '/etc/udev/hwdb.d/70-mouse.hwdb': Introduced in 6366e349 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: note that we care about the maximum frequency in MOUSE_DPIPeter Hutterer
Devices with dynamic frequency scaling adjust the frequency as needed. For those we only care about the maximum frequency, not the various in betweens. https://bugs.freedesktop.org/show_bug.cgi?id=87435#c8 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: adjust max frequency of Logitech RX 250Zbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=87435 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17hwdb: mouse DPI data, Logitech Gaming Mouse G400Jonas Ådahl
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-10src/v4l_id: fix compile errorAnthony G. Basile
2015-01-07udevadm,..: make --help output of udev tools more like the output of the ↵Lennart Poettering
various other tools Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07udev: improve help/usage for some more programsRobert Milasan
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07accelerometer: display short options tooRobert Milasan
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07accelerometer: drop unused -x optionRobert Milasan
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07hwdb: bring bluetooth and mouse hwdb's up to dateAnthony G. Basile
2015-01-07hwdb: revert Logitech Optical USB MousePeter Hutterer
Reporter says he incorrectly measured the data but the device is not available anymore to correct it. We'll have to wait for someone else to submit the data. https://bugs.freedesktop.org/show_bug.cgi?id=87343 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29src/shared/missing.h: add __NR_getrandom for other archesAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29shared: utf8 - support decoding the full utf16Tom Gundersen
We originally only supported the BMP (i.e., we treated UTF-16 as UCS-2). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29shared: utf8 - support ucs4 -> utf8Tom Gundersen
Originally we only supported ucs2, so move the ucs4 version from libsystemd-terminal to shared and use that everywhere. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29NOTES: Keep notes on significant deviations from upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29libudev: fix strict aliasing violationShawn Paul Landden
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29hwdb: mouse - add Razer AbyssusTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29hwdb: add rule and first entry for PS/2 micePeter Hutterer
https://bugs.freedesktop.org/show_bug.cgi?id=87037 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29hwdb: Microsoft Wireless Laser Mouse 8000 DPI dataFrank Theile
https://bugs.freedesktop.org/show_bug.cgi?id=87587 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29hwdb: Lenovo USB mouse MO28UOL DPI dataFrank Theile
https://bugs.freedesktop.org/show_bug.cgi?id=87504 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29ata_id: remove temp variable to kill warningZbigniew Jędrzejewski-Szmek
src/ata_id/ata_id.c:503:24: warning: assignment from incompatible pointer type identify_words = &identify.wyde; ^ Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29ata_id: modernizeZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29udev: fix another strict aliasing issueShawn Paul Landden
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-29util: fix strict aliasing violations in use of struct inotify_event v5Shawn Paul Landden
There is alot of cleanup that will have to happen to turn on -fstrict-aliasing, but I think our code should be "correct" to the rule. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20man/udev.xml: restore hwdb documentationAnthony G. Basile
2014-12-20hwdb/60-keyboard.hwdb: updateAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20hwdb: move Logitech mouse to the right spotZbigniew Jędrzejewski-Szmek
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20hwdb: Logitech, Inc. RX 250 Optical Mouse DPI dataErik Auerswald
https://bugs.freedesktop.org/show_bug.cgi?id=87435 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20hwdb: Logitech, Inc. RX 300 Optical Mouse DPI dataTim JP
https://bugs.freedesktop.org/show_bug.cgi?id=87456 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20util: rename ignore_file() to hidden_file()Lennart Poettering
hidden_file() is a bit more precise, since dot files usually shouldn't be ignored, but certainly be considered hidden. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20util: when creating temporary filename for atomic creation of files, add an ↵Lennart Poettering
extra "#" to the name That way, we have a simple, somewhat reliable way to detect such temporary files, by simply checking if they start with ".#". Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20Treat a trailing backslash as an errorZbigniew Jędrzejewski-Szmek
Commit a2a5291b3f5 changed the parser to reject unfinished quoted strings. Unfortunately it introduced an error where a trailing backslash would case an infinite loop. Of course this must fixed, but the question is what to to instead. Allowing trailing backslashes and treating them as normal characters would be one option, but this seems suboptimal. First, there would be inconsistency between handling of quoting and of backslashes. Second, a trailing backslash is most likely an error, at it seems better to point it out to the user than to try to continue. Updated rules: ExecStart=/bin/echo \\ → OK, prints a backslash ExecStart=/bin/echo \ → error ExecStart=/bin/echo "x → error ExecStart=/bin/echo "x"y → error Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20path-util: fix breakage in path_is_mount_pointDave Reisner
This fixes 2 problems introduced by 6feeeab0bc: 1) If name_to_handle_at returns ENOSYS for the child, we'll wrongly return -ENOSYS when it returns the same for the parent. Immediately jump to the fallback logic when we get ENOSYS. 2) If name_to_handle_at returns EOPNOTSUPP for the child but suceeds for the parent, we'll be comparing an uninitialized value (mount_id) to an initialized value (mount_id_parent). Initialize the mount_id variables to invalid mount_ids to avoid this. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20path: make the check for unsupported name_to_handle_at symmetricZbigniew Jędrzejewski-Szmek
If child supports, but the parent does not, or when the child does not support, but the parent does, assume the child is a mount point. Only if neither supports use the fallback. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20path: follow symbolic link for parent path (2)Umut Tezduyar Lindskog
c0e57ba9e22ee937722958d8b912ade2a37f206d fixed the fallback path. We should do the same for name_to_handle_at(). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20path: follow symbolic link for parent pathUmut Tezduyar Lindskog
[zj: When we lstat the target path, symlinks above the last component will be followed by both stat and lstat. So when we look at the parent, we should follow symlinks.] Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20shared: strv - add strv_clear()Tom Gundersen
This frees the elements of the strv without freeing the strv itself. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20shared: path-util - memory leakTom Gundersen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20fix compiler warningSusant Sahani
src/shared/utf8.c:268:13: warning: unused variable 'd' [-Wunused-variable] int d;
2014-12-20src/shared/util.c: fix tempfn_xxxxxx()Anthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20configure.ac: add a generic --enable-debug, replace --enable-hashmap-debugMichal Schmidt
There will be more debugging options later. --enable-debug will enable them all. --enable-debug=hashmap will enable only hashmap debugging. Also rename the C #define to ENABLE_DEBUG_* pattern. NOTE: We add the debugging code to hashmap.{c,h} but do not add the option in configure.ac. We may do so at a later time. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20src/shared/utf8.c: follow upstream adding utf8_encode_unichar()Lennart Poettering
This is part of upstream's e7eebcfc42f00aa481ef31abc8e7e243c16f5b2c in which they add a minimal JSON tokenizer. We don't add that but update utf8 stuff from that commit to follow upstream more closely. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-20shared/hashmap.h: fix commentMichal Schmidt
An early version used underscore prefixes for internal functions, but the current version uses the prefix "internal_". Signed-off-by: Anthony G. Basile <blueness@gentoo.org>