Commit Graph

10539 Commits

Author SHA1 Message Date
Kay Sievers
c1b14d45a9 rules: default - remove legacy agpgart
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 15:16:06 -04:00
Kay Sievers
586a3da832 rules: move block device rules to its own rules file
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 15:13:47 -04:00
Kay Sievers
d2313434ac rules: storage - relace blacklist with explicit whitelist
Newly added kernel drivers repeatedly pass our blacklist and
cause trouble for the devices, because they do not expect to
be examined by udev's default rules which include blkid.

This turns the blacklist into a whitelist. Device type which
need support for additional symlinks need to be added to the
whitelist now.

Note, that the by-id, by-path symlinks are only intended for
hotpluggable devices. There is no reason for exotic, or for
statically configured devices to provide them.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 15:09:38 -04:00
Anthony G. Basile
4f3fb6e445 shared: import close_many() from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-18 15:07:54 -04:00
Lennart Poettering
d80d6e858f shared: introduce cmsg_close_all() call
The call iterates through cmsg list and closes all fds passed via
SCM_RIGHTS.

This patch also ensures the call is used wherever appropriate, where we
might get spurious fds sent and we should better close them, then leave
them lying around.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 14:11:30 -05:00
Martin Pitt
1d1660eb1c rules: simplify mmc RPMB handling
We don't actually want a by-path/ symlink for MMC RPMB devices, so just add
them to the blacklist. This will prevent creating wrong by-path links and
blkid'ing those.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:43:38 -05:00
Martin Pitt
28860e0e7f rules: Fix by-path of mmc RPMB partitions and don't blkid them
Linux 3.10+ exposes RPMB (Replay Protected Memory Block) partitions of MMC
devices [1] ; trying to read them with blkid or other unspecific means will
cause kernel buffer I/O errors and timeouts. So don't run blkid on these.

Also ensure that /dev/disk/by-path creates proper symlinks and exposes the
-rpmb partition separately, instead of letting the "normal" partition symlink
point to the rpbm device (this is a race condition).

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=090d25fe224c0

https://launchpad.net/bugs/1333140

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:43:00 -05:00
Arend van Spriel
e5e0478a43 hwdb: add sdio identifiers for Broadcom WLAN cards
This patch adds the sdio identifiers known to be supported by
the brcmfmac open-source driver.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:41:18 -05:00
Marcel Holtmann
1fe2f766fd hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:40:42 -05:00
Lubomir Rintel
d58e83822c hwdb: fix ThinkPad X* Tablet special keys
ThinkPad tablet firmware has DMI product name and version reversed:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: LENOVO
        Product Name: 7762AS1
        Version: ThinkPad X61 Tablet
        Serial Number: LKZCDH2
        UUID: 6ADBC681-4FC9-11CB-844F-B47CB9210BE2
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: ThinkPad X61 Tablet

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:39:42 -05:00
Marcel Holtmann
ed3171a211 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:39:08 -05:00
Lennart Poettering
cb52e23e93 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:38:32 -05:00
Lennart Poettering
ea55d7fed3 hwdb: fix syntax
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:37:55 -05:00
Lukas Märdian
43bbecde22 hwdb: Microsoft Microsoft 3-Button Mouse
https://bugs.freedesktop.org/show_bug.cgi?id=89149

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:37:16 -05:00
Lennart Poettering
df03a96d66 hwdb: update name databases
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:35:02 -05:00
Hui Wang
ee527a712a keymap: Add microphone mute keymap for several HP laptops
On these several HP laptops, the microphone mute hotkey is "Fn+F8" and
the scancode for this hotkey is 0x81, but this scancode was mapped to
fn_esc in the HP generic keymap section. To fix this problem, we add
a machine specific keymap section to add the correct keymap rule.

BugLink: https://bugs.launchpad.net/bugs/1409721
BugLink: https://bugs.launchpad.net/bugs/1334968
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-03-01 13:34:11 -05:00
Anthony G. Basile
7de936b9db src/udev/udev-event.c: clean up net if renaming code
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 19:23:47 -05:00
Anthony G. Basile
298f6c8128 src/udev/udev-builtin.c: remove legacy optional keymap
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 18:40:16 -05:00
Anthony G. Basile
79bf63bcff src/udev/udev-builtin-kmod.c: remove the modprobe alt to kmod code 2015-02-11 18:06:47 -05:00
Anthony G. Basile
158c3f34cf LEGACY: notes on what legacy features are preserved in each branch
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 17:10:37 -05:00
Anthony G. Basile
2b7abd5ec9 src/udev/udevd.c: remove create static nodes from modules 2015-02-11 17:01:41 -05:00
Anthony G. Basile
0a5fbf1cdb Minor cleanups 2015-02-11 16:53:37 -05:00
Tom Gundersen
e0bb33e4a8 libudev: private - drop some functions from the internal API
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 16:26:30 -05:00
Tom Gundersen
b39a4a3aba udev: event - move renaming of udev_device to libudev
This is not exposed in the public API. We want to simplify the internal libudev-device API as much as possible
so that it will be simpler to rip the whole thing out in the future.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 16:21:58 -05:00
Anthony G. Basile
691df3c5c3 rule_generator: remove legacy code 2015-02-11 15:44:15 -05:00
Anthony G. Basile
ff78357e55 configure.ac: bump to 3.0 branch
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-02-11 14:59:18 -05:00
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