Commit Graph

10463 Commits

Author SHA1 Message Date
Anthony G. Basile a886604b8a Add .travis.yml
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-09 16:49:33 -05:00
Anthony G. Basile 75039e7057 configure.ac: bump to 2.2 2015-02-08 11:52:13 -05:00
Anthony G. Basile 1c8a49ad3b skip libudev: private - drop some functions from the internal API
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:51:51 -05:00
Tom Gundersen d868c5f724 libudev: monitor - move nulstr parsing to libudev-device
Hide the details a bit.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:38:43 -05:00
Lennart Poettering 21212e5224 util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:22:39 -05:00
Tom Gundersen 750c8ded9b udev: event - minor nit
Stay uniform and use 'dev' rather than 'event->dev', as these are aliases (and event->dev looks
like it may be a typo for event->dev_db).

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:14:54 -05:00
Tom Gundersen 7edee6302e udev: event - introduce and use internal udev_device_shallow_clone()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:13:01 -05:00
Anthony G. Basile 318c9e4c8c Skip udev: event - move renaming of udev_device to libudev
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 11:09:19 -05:00
Bastien Nocera 821cef6a5b hwdb: Bind "toolbox" buttons to the Windows key
One would expect pressing the button to go to an overview / show
applications mode, we thus map it to leftmeta, the Windows key.

See https://bugzilla.gnome.org/show_bug.cgi?id=658602#c17

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 08:25:07 -05:00
Marcel Holtmann c676d2825d hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 08:24:25 -05:00
Peter Hutterer b51ba787a3 hwdb: add a touchpad hwdb
Currently used to tag devices in the new Lenovo *50 series and the X1 Carbon
3rd. These laptops re-introduced the physical trackpoint buttons that were
missing from the *40 series but those buttons are now wired up to the
touchpad.

The touchpad now sends BTN_0, BTN_1 and BTN_2 for the trackpoint. The same
button codes were used in older touchpads that had dedicated scroll up/down
buttons. Input drivers need to work around this and thus know what they're
dealing with.

For the previous gen we introduced INPUT_PROP_TOPBUTTONPAD in the kernel, but
the resulting mess showed that these per-device quirks should really live in
userspace.

The list currently includes the X1 Carbon 3rd PNPID, others will be added as
get to know which PNPID they have.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 08:21:43 -05:00
Martin Pitt 681b0e3876 rules: clean up stale CD drive mounts after ejection
Ejecting a CD with the hardware drive button only causes a change uevent, but
the device node stays around (just without a medium). Pick up these uevents and
mark the device as SYSTEMD_READY=0 on ejection, so that systemd stops the
device unit and consequently all mount units on it.

On media insertion, mark the device as SYSTEMD_READY=1 again.

https://bugs.freedesktop.org/show_bug.cgi?id=72206
https://bugzilla.opensuse.org/show_bug.cgi?id=909418
https://bugs.archlinux.org/task/42071
https://bugs.launchpad.net/bugs/1168742

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-08 08:18:23 -05:00
Zbigniew Jędrzejewski-Szmek c7badd37d3 build-sys: fix build on compilers without static_assert
Build would fail when assert was used on the same line in
different files #included together.

https://bugs.freedesktop.org/show_bug.cgi?id=87339

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:26:23 -05:00
Lennart Poettering 5fc65c174b src/shared/util.h: only define the _to_string() enum mapping function
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:25:28 -05:00
Anthony G. Basile 45a85a5a6d src/shared/util.h: further cleanup PID_FMT
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:19:14 -05:00
Zbigniew Jędrzejewski-Szmek dc4537595a Fix some format strings for enums, they are signed
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:11:39 -05:00
Zbigniew Jędrzejewski-Szmek 2ecc6ef9a2 shared/util: use signed printf format for PIDs
gcc 5 started warning about this.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:07:21 -05:00
Lennart Poettering d08c44759a log: add new log output mode, that prints to console, but
prefixes with syslog priority

This is useful when we execute our own programs, reading output from its
STDERR, and want to retain priority information.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 17:02:36 -05:00
Martin Pitt 4e716cdeb5 util: Add some missing hidden_file() suffixes
dpkg itself also uses *.dpkg-dist, while .dpkg-{bak,backup,remove} are being
used by dpkg-maintscript-helper.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:55:31 -05:00
Zbigniew Jędrzejewski-Szmek 475b84c01a Move DEFINE_TRIVIAL_CLEANUP_FUNC to macro.h
This remove the need for various header files to include the
(relatively heavyweight) util.h.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:50:37 -05:00
Zbigniew Jędrzejewski-Szmek 6d90157e44 Add initialization helper for file_handle_union
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:40:20 -05:00
Topi Miettinen 0e18836796 libudev: fix check for too long packet
Don't use recvmsg(2) return value to check for too long packets
(it doesn't work) but MSG_TRUNC flag.

(David: add parantheses around condition)

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:36:53 -05:00
Zbigniew Jędrzejewski-Szmek d98458c3c4 Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable.
Too bad.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:30:19 -05:00
Maxim Mikityanskiy 3bbbd500c9 hwdb: restore comments about MSI devices
Some time ago 95-keymap.rules was replaced by
60-keyboard.hwdb. Original comments for MSI laptops (that were in
95-keymap.rules) were removed, but I think they are important for
understanding what's going on.

https://bugs.freedesktop.org/show_bug.cgi?id=88412

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 16:16:13 -05:00
Peter Seiderer 2242855594 src/shared/util.{c,h}: fix build when mkostemp is not supported
Not all instance of mkostemp were protected with #ifndef HAVE_DECL_MKOSTEMP.
We fix this for the definition of the wrapper mkostemp_safe() in the c file
and in the header.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25 14:00:27 -05:00
blueness 5e7fcb69f1 Merge pull request #104 from tseeker/remove-unused-libm
Build files: remove extraneous dependency
2015-01-23 14:59:26 -05:00
blueness 66237235a9 Merge pull request #105 from tseeker/fix-compile-ata_id
src/ata_id/Makefile.am: fix compilation error
2015-01-21 18:08:51 -05:00
Emmanuel Benoît ad1f456752 Build files: remove extraneous dependency
* configure.ac: use LT_LIBM to check for the maths library
* src/accelerometer/Makefile.am: use $(LIBM) instead of -lm in the link
flags

This causes all executables (except accelerometer) and libraries to be
linked without libm, which they do not need.
2015-01-21 16:45:55 +01:00
Emmanuel Benoît edc8d80428 src/ata_id/Makefile.am: Fixed compilation error
It is necessary to include src/udev to the include path, because
ata_id.c includes src/shared/udev-util.h which itself includes
src/udev/udev.h
2015-01-21 16:43:47 +01:00
blueness 877de5b8ee Merge pull request #99 from zaufi/master
Remove some garbage code inherited from `systemd`
2015-01-21 07:12:39 -05:00
Anthony G. Basile 39b17cdaa8 src/udev/Makefile.am: fix build wrt udev-builtin-evdev_id.c
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 10:16:31 -05:00
David Herrmann 236bd1a03e log: fix log_full_errno() with custom facilities
Make sure to extract the log-priority when comparing against
max-log-level, otherwise, we will always drop those messages.

This fixes bus-proxyd to properly send warnings on policy blocks.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 09:52:44 -05:00
Tom Gundersen a9421a42aa path-util: plug leak
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 09:49:50 -05:00
David Herrmann f396506294 udev: merge evdev_id into input_id
There is no reason to keep both separated. We want to avoid API specific
tools and instead keep generic terms like 'input'.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 09:32:56 -05:00
David Herrmann 1fd8fecb5f udev: fix NULL-ptr deref
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-17 09:26:12 -05:00
Carlos Garnacho e155f21d67 udev: Add builtin/rule to export evdev information as udev properties
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-17 09:23:30 -05:00
Lennart Poettering 19a6261c64 udev: make use of new one_zero() helper where appropriate
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 09:00:33 -05:00
Lennart Poettering 79332668e3 udevadm: don't hit an assert when obsolete parameters are passed
https://bugzilla.redhat.com/show_bug.cgi?id=1178051

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 08:58:29 -05:00
Peter Hutterer 1b0002257b hwbd: add click angle for the Logitech M325
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-17 08:43:51 -05:00
Peter Hutterer 9cf4514e01 hwdb: add MOUSE_WHEEL_CLICK_ANGLE as property
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-17 08:43:13 -05:00
Lennart Poettering 8f2b1bb6dd hwdb: add Kay's Laser Mouse to the dpi database
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 08:42:32 -05:00
Peter Hutterer 7cbac7b22b hwdb: add missing line between the G400 entries
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-17 08:41:21 -05:00
Peter Hutterer fe1d7746fe hwdb: note that we care about the maximum frequency in MOUSE_DPI
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-17 08:40:41 -05:00
Zbigniew Jędrzejewski-Szmek 971c473db7 hwdb: adjust max frequency of Logitech RX 250
https://bugs.freedesktop.org/show_bug.cgi?id=87435

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 08:39:00 -05:00
Jonas Ådahl 8736c07c8b hwdb: mouse DPI data, Logitech Gaming Mouse G400
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-17 08:38:18 -05:00
Anthony G. Basile 8581fe66c1 src/v4l_id: fix compile error 2015-01-10 07:49:38 -05:00
Lennart Poettering 81ce2af261 udevadm,..: make --help output of udev tools more like the output of the various other tools
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07 16:53:15 -05:00
Robert Milasan 2ce4bb9f12 udev: improve help/usage for some more programs
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07 16:42:09 -05:00
Robert Milasan 251b8f66aa accelerometer: display short options too
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07 16:40:19 -05:00
Robert Milasan ec0310d5e4 accelerometer: drop unused -x option
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-07 16:39:14 -05:00