Commit Graph

10219 Commits

Author SHA1 Message Date
blueness
cb2823bc02 Merge pull request #96 from gentoo/refactor-shared
src/shared: refactor shared code
2014-08-06 06:36:03 -04:00
Anthony G. Basile
b1ac60946d src/shared: refactor shared code
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 19:22:24 -04:00
Anthony G. Basile
4b8733ffe9 src/{libudev,udev}: minor renamings from upstream 2014-08-05 17:03:25 -04:00
Anthony G. Basile
e35ef44ebe test: use _cleanup_ attribute
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 10:46:11 -04:00
Anthony G. Basile
32ac962335 m4/gtk-doc.m4: update to serial 2
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 10:23:10 -04:00
Anthony G. Basile
d527e17812 docs/gudev/gudev-sections.txt: add two missing functions
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 10:14:50 -04:00
Anthony G. Basile
602fd80cd6 rules: bring up to date
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 10:14:50 -04:00
Anthony G. Basile
dc54fb8a24 src/libudev/missing.h: clean up unused BTRFS_* decls
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 10:14:45 -04:00
Anthony G. Basile
96f70f054e src/collect/collect.c: remove excessive error reporting
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 09:27:15 -04:00
Martin Pitt
60728b7c12 keymap: Fix HP Pavillon DV7
Properly disable scan code 94 instead of producing KEY_0.

https://launchpad.net/bugs/1322770

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:50:07 -04:00
Martin Pitt
4d541b2608 udev-builtin-keyboard: Allow numeric key codes
Like with the old udev rules, allow hwdb entries to specify numeric key codes.
Based on a patch from Mircea Miron.

https://launchpad.net/bugs/1247584

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:48:39 -04:00
Kay Sievers
d9a9899974 udev: path_id - suppress ID_PATH for devices with an unknown parent device type
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1321816

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:48:05 -04:00
Zbigniew Jędrzejewski-Szmek
d8808bc082 Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.

When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.

Also, simplify things here and there.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:38:32 -04:00
Anthony G. Basile
ba3e123a22 Include missing.h in udev-builtin-btrfs.c, and move BTRFS_IOC_DEVICES_READY to missing.h
This is a combination of upstream commits

    dced15575f7bf172e3c9d798c43477539525558c
    7bed7f0e3b1f9596aedb64657e432e5b267adebb

by

    Simon McVittie <simon.mcvittie@collabora.co.uk>
    7bed7f0e3b1f9596aedb64657e432e5b267adebb

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-05 08:32:35 -04:00
Zbigniew Jędrzejewski-Szmek
93bc913f14 man: add udev.conf(5)
We generally have separate man pages for all configuration files.
In this case udev.conf was already described in systemd-udevd.service(8),
but it was hard to find. Docbook makes it hard to add a .so link from
a different section, so describe udev.conf in its own page.

Signedaoff-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 11:54:48 -04:00
Zbigniew Jędrzejewski-Szmek
5f63fcb010 Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.

Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.

_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.

Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.

mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS  $RootDir $MountPoint
mbiebl_> which is pretty weird

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 11:52:34 -04:00
Zbigniew Jędrzejewski-Szmek
837a0df028 Fix misuse of uint64_t as size_t
They have different size on 32 bit, so they are really not interchangable.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 10:11:12 -04:00
Tom Gundersen
00dbb96b4a libudev: set errno when udev_device_new_from_* or udev_device_get_parent_* fail
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 10:09:07 -04:00
Kay Sievers
d97bc57bad hwdb/ids-update.pl: bring up to date with upstream.
This includes pieces of the following commits:

    d060b62fcb4746d3758c567e9379c6728a035b66
    bd63a88fb0478da2e93c363849b73aed8be36ae7

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 10:06:05 -04:00
Kay Sievers
9ef02bd6f4 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 10:01:31 -04:00
Martin Pitt
daab6c9ae9 keymap: Annotate all micmute workarounds
Add a comment to all assignments to f20 that this actually should be "micmute"
in a future when we aren't limited by X.org's key code limiations any more.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 09:59:46 -04:00
Hui Wang
5a3a66d76c keymap: Add microphone mute keymap for Dell Latitude
On the Dell Latitude, the mic mute key event is generated by wmi
driver, the keycode assigned to this hotkey from kernel is
KEY_MICMUTE (248), this keycode is too big for xorg to handle,
in the xorg, the XF86AudioMicMute is assigned to F20.

Please refer to 4e648ea0 of xkeyboard-config.

BugLink: https://bugs.launchpad.net/bugs/1326684
BugLink: https://bugs.launchpad.net/bugs/1339998
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-08-04 09:59:02 -04:00
Hannes Reinecke
de02265b5a udev: fixup commit dd5eddd28a74a49607a8fffcaf960040dba98479
Commit dd5eddd28a74a49607a8fffcaf960040dba98479 accidentally
removed one line too many.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30 09:47:41 -04:00
Kay Sievers
65af29f3f7 udev: place opening { at the same line as the function declaration
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30 09:46:35 -04:00
Kay Sievers
471a5f3411 udev: unify event timeout handling
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30 09:31:38 -04:00
Hannes Reinecke
babb0ec586 udevd: add --event-timeout commandline option
Some events take longer than the default 30 seconds. Killing those
events will leave the machine halfway configured.

Add a commandline option '--event-timeout' to handle these cases.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30 09:30:59 -04:00
Kay Sievers
c4ffad5655 udev: exclude MD from block device ownership event locking
MD instantiates devices at open(). This is incomptible with the
locking logic, as the "change" event emitted when stopping a
device will bring it back.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-25 07:59:15 -04:00
Zbigniew Jędrzejewski-Szmek
e0f01e5b67 Be more careful when checking for empty files
If we want to avoid reading a totally empty file, it seems better
to check after we have opened the file, not before.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-19 13:27:32 -04:00
Anthony G. Basile
54fac72da7 src/libudev/Makefile.am: update libudev revision
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-15 08:19:07 -04:00
Bastien Nocera
c99c8103e7 accelerometer: Don't wait for new data from the sensor
Instead of waiting for new data from the sensor, which might be
a long time coming, depending on the sensor device, ask the kernel
for the last state for that particular input device.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-10 16:21:59 -04:00
Anthony G. Basile
a51173a35e configure.ac: bump to 1.9 = upstream 215
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-06 08:00:08 -04:00
Anthony G. Basile
368ad52438 src/libudev/util.c: import flush_fd() from upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-06 07:59:11 -04:00
Kay Sievers
231fb49727 hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-05 07:44:53 -04:00
Marcel Holtmann
5dc78d90e0 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-05 07:44:12 -04:00
Tom Hirst
b856641839 rules: don't enable usb pm for Avocent devices
The Avocent KVM over IP devices doesn't work correctly with USB power
management enabled.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-02 09:42:05 -04:00
Kay Sievers
9031b0d0a7 libudev: queue - watch entire directory to allow the re-use of the watch descriptor
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-01 07:22:32 -04:00
Kay Sievers
a31296d41e libudev: queue provide file descriptor to watch busy event queue
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-01 07:20:47 -04:00
Kay Sievers
e17b263727 libudev: fix udev_queue_get_queue_is_empty() logic
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-01 07:16:16 -04:00
Anthony G. Basile
cd03d84ff0 configure.ac: separate out rootlibdir and rootlibexecdir 2014-06-24 15:28:01 -04:00
Anthony G. Basile
9851827c99 configure.ac: improve install paths for udevlibexecdir, udevkeymapdir, udevkeymapforceredir, udevrulesdir 2014-06-24 13:04:46 -04:00
Kay Sievers
df07929b8a gudev: replace regex with sym file
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-24 10:09:40 -04:00
Anthony G. Basile
441d5c2b39 configure.ac: bump to 1.8 = upstream 214
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-19 19:58:05 -04:00
Kay Sievers
37f39cae3b rules: add loop-control and btrfs-control to "disk" group
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-19 08:01:37 -04:00
Marcel Holtmann
900bee63a5 hwdb: Update database of Bluetooth company identifiers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-19 08:00:13 -04:00
Thomas Hindoe Paaboel Andersen
b80d8297ad udev: check the return value from udev_enumerate_scan_devices
The return value from udev_enumerate_scan_devices was stored but
never used. I assume this was meant to be checked.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-15 09:30:49 -04:00
Christian Hesse
4fb073f4e8 udev: really exclude device-mapper from block device ownership event locking
Arguments were wrong order, no?
This fixes commits:

e918a1b5a94f270186dca59156354acd2a596494
3d06f4183470d42361303086ed9dedd29c0ffc1b

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-15 09:30:02 -04:00
Kay Sievers
5e3ab83ab3 udev: assign group "input" to all input devices
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-15 08:14:30 -04:00
Kay Sievers
b4df39ea74 udev: stop using "floppy" group
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-15 08:13:39 -04:00
Kay Sievers
2c93acb8c2 hwdb: fix case-sensitive match
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-07 08:53:04 -04:00
Zbigniew Jędrzejewski-Szmek
f12c9a6b38 keyboard: add Plantronics .Audio mute button
https://bugs.freedesktop.org/show_bug.cgi?id=79495

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-06-07 08:52:58 -04:00