Bryan Kadzban [Mon, 11 Jan 2010 01:02:29 +0000 (17:02 -0800)]
Fix reverted floppy-device permissions
Commit d93fb59c50a720e2a1ace2177cc824c00ff8eed6 ("rules: set mode of
floppy device nodes to 0660") changed the create_floppy_devices -M
argument to 0660, for udev-148.
Jerone Young [Sun, 3 Jan 2010 10:42:12 +0000 (11:42 +0100)]
keymap: Lenovo Thinkpad USB Keyboard with Tracepoint
Add support for special function keys on Lenovo Thinkpad USB Keyboard
Tracepoint.
- VoIP hotkey "FN+F6" is mapped to camera, and may need to change
if there is a standard VoIP hotkey defined.
- Mute Microphone key has not been defined, as there is no
standard key defined for it yet.
Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
The move_later_prefix variable was reset to zero on each
loop iteration, and thus the move_later entry (if any) was
not added right after changing to another syspath prefix,
but rather after exiting the enumeration loop.
Kay Sievers [Fri, 25 Dec 2009 14:23:45 +0000 (15:23 +0100)]
remove UDEV_RUN environment variable
It handles only RUN but not IMPORT and PROGRAM. There is no sane way
to suppress program execution. Most important programs run with IMPORT
these days. Also events can no longer suppressed with the libudev
netlink messages, so UDEV_RUN does nothing useful and is just
inconsistent.
Martin Pitt [Wed, 23 Dec 2009 09:38:20 +0000 (10:38 +0100)]
keymap: Add Logitech S510 USB keyboard
The Logitech S510 identifies just like the already existing
"logitech-wave-cordless" variant, but with wildly different scancodes. So just
merge the tables, since they won't collide.
Required for the keyboard driver to recognize special keys such as Fn+F2
(battery), Fn+F3 (euro), Fn+F4 (switchmode), Fn+F6 (mute), Fn+F7
(XF86Launch2), Fn+up/down (brightness), Fn+left/right (volume). Fn+F5 (blank
screen) and Fn+F8 still do not generate events after this change, howver.
Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Daniel Elstner [Mon, 14 Dec 2009 20:15:20 +0000 (21:15 +0100)]
libudev: wrap in extern "C" block for C++
When libudev.h is included from C++ code, wrap the declarations in an
extern "C" { ... } block. This tells the C++ compiler that symbols
are exported with C linkage and no name-mangling.
Some laptop keyboards don't generate release events
for some hotkeys. Since linux-2.6.32 the list of scancodes
for which to enable the force_release quirk can be set
via sysfs.
Apply this to Samsung N130.
Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
There doesn't seem to be any special class for their developer
interface, so match by Vendor and Device id like we do for things
like fingerprint readers.
This is better than their current 0666 suggestion <g>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
David Zeuthen [Fri, 4 Dec 2009 16:25:09 +0000 (11:25 -0500)]
Export ID_WWN_VENDOR_EXTENSION and ID_WWN_WITH_EXTENSION
Some SCSI devices use the same WWN and have a WWN extension that we
need to take into account when creating the /dev/disk/by-id/wwn
symlinks. Thus, introduce ID_WWN_WITH_EXTENSION. This property will
contain either the WWN (if no extension is present) or the WWN with
the vendor extension appended.
Kay Sievers [Thu, 3 Dec 2009 13:36:36 +0000 (14:36 +0100)]
fix both in-tree and out-of-tree builds
On Thu, Dec 3, 2009 at 14:31, Daniel Elstner <daniel.kitta@googlemail.com> wrote:
> However, I'd recommend to look first in the build directory, and then in
> the source directory to match the behavior of make with VPATH builds.
> The idea is that a file in the build tree, if it exists, overrides a
> file of the same name in the source tree.
Kay Sievers [Thu, 3 Dec 2009 12:58:18 +0000 (13:58 +0100)]
really really fix both in-tree and out-of-tree builds
The include is still missing:
GEN extras/gudev/GUdev-1.0.gir
In file included from <stdin>:4:
/home/kay/work/src/udev/extras/gudev/gudev.h:26:34: error: gudev/gudevenumtypes.h: No such file or directory
Daniel Elstner [Wed, 2 Dec 2009 20:39:50 +0000 (22:39 +0200)]
really fix both in-tree and out-of-tree builds
Makefile.am (extras/gudev/GUdev-1.0.gir): Look for gudevenumtypes.h
in both the build directory and the source directory, so that it works
in either case.
Martin Pitt [Thu, 3 Dec 2009 11:56:44 +0000 (12:56 +0100)]
input_id: check event mask
Check the capabilities/ev for the particular event class before testing bits in
that event class. This avoids testing potentially bogus data if the device does
not support that class of events at all.
Martin Pitt [Thu, 3 Dec 2009 09:16:49 +0000 (10:16 +0100)]
input_id: Fix endless loop for non-input devices
When being called on a device which is not in the "input" subsystem, or doesn't
have an "input" parent, it got stuck in an endless loop. Unfortunately this
includes the virtual/input/mice multiplexer, which exposes this bug on just
about every system.
The issue in:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=7fa9bb9dbf538bf3c8a25a6699f65a8ac9cc8bbf
still exists. We need to find a reliable way not to break
"make distcheck" here.
Martin Pitt [Wed, 2 Dec 2009 10:14:19 +0000 (11:14 +0100)]
input_id: code cleanup
Now use libudev to clean up hardcoded /sys/ and /device/ paths, and to also
support direct input device arguments. Now both "input4" and "event4" will
work.
Dmitry Torokhov [Mon, 30 Nov 2009 22:03:05 +0000 (23:03 +0100)]
extras/input_id: Correctly identify touchpads
BTN_TOUCH (as well as ABS_PRESSURE) is used not only by touchpads but
by touchscreens as well. The proper check for a touchpad is presence
of BTN_TOOL_FINGER and absence of BTN_TOOL_PEN (the latter to filter
out some tablets that use BTN_TOOL_FINGER).
Tablet matching should be on either BTN_TOOL_PEN or BTN_STYLUS.
Martin Pitt [Mon, 30 Nov 2009 17:38:43 +0000 (18:38 +0100)]
extras: Add input_id
input_id probes input/event devices for their class (keyboard, keys, mouse,
touchpad, tablet, joystick). This is based on the corresponding hal code in
hald/linux/device.c, input_test_{abs,rel,...}.
This should provide enough functionality to get hal-less X.org working (which
in particular needs to know exactly which devices are touchpads).
Replace the brittle hacks in 60-persistent-input.rules with checking for the
new ID_INPUT_* flags. This keeps the old ID_CLASS properties for now (but they
are to be removed later on).
Note: The current code has several hacks still, which are to be replaced with
proper libudev calls later on.
Dan Williams [Mon, 23 Nov 2009 21:54:35 +0000 (13:54 -0800)]
modem-modeswitch: 61-option-modem-modeswitch.rules is only for Option NV devices
Make people aware that they shouldn't add devices not manufactured by
Option NV to 61-option-modem-modeswitch.rules. modem-modeswitch only
supports ejecting the fake CD for Option NV devices at this time.
People should be using (and fixing) usb_modeswitch instead of
modem-modeswitch.
The 'option-zerocd' method should *only* be used with Option NV devices
since other manufacturers have completely different methods for killing
their fake driver CD.
The 'option-zerocd' method should *only* be used with Option NV devices
since other manufacturers have completely different methods for killing
their fake driver CD.
David Zeuthen [Sat, 21 Nov 2009 01:21:58 +0000 (20:21 -0500)]
scsi_id: Export WWN and Unit Serial Number
Since the Unit Serial Number and the WWN are useful bits of
information export them as properties in the udev database. These
bits of information are often printed on the physical disk, see
and displaying them separately in the UI (or in /dev/disk) might help
users identify the physical disk. This patch exports these bits of
information as ID_WWN and ID_SCSI_SERIAL.
Unfortunately we can't overload ID_SERIAL for two reasons
1. ID_SERIAL (and ID_SERIAL_SHORT) exported by scsi_id isn't really
the unit serial number (as defined by SCSI) - it is sometimes the
WWN (since it is more unique than the Unit Serial Number) and
complex rules (to make the serial unique) govern what value to
use.
2. It would break existing setups if the value of ID_SERIAL changed
Kay Sievers [Thu, 19 Nov 2009 15:25:18 +0000 (16:25 +0100)]
rules: remove support for IDE (hd*) devices
The kernel IDE drivers get deprecated now:
http://article.gmane.org/gmane.linux.ide/43151
Almost everybody has switched over to libata devices long ago.
Recent services do not work with the now deprecated IDE drivers
at all and require libata drivers and SCSI infrastructure.
Systems who care about the old stuff need to add the rules to the
compat rules.
Kay Sievers [Mon, 16 Nov 2009 14:22:17 +0000 (15:22 +0100)]
remove "ignore_device"
There is no way to ignore an event these days. Libudev events can
not be suppressed. It only prevents RUN keys from being executed,
which results in an inconsistent behavior in current setups.
David Zeuthen [Tue, 10 Nov 2009 17:32:38 +0000 (12:32 -0500)]
cdrom_id: Still check profiles even if there is no media
Even when there is no medium in the drive, we should still check the
profiles supported by the drive. Otherwise we fail to detect things
like Blu-ray drives. See
After discussing this with Kay we decided to drop this again as by-id
links only make sense for devices that have a unique serial id. If they
don't any attempts to make them unique have the side effect of
nourishing assumptions by users that cannot be met, as the by-id device
link of a device could differ depending on the history of simultaneously
plugged in device.
So, to make sure that all device nodes follow the same rules for by-id/
symlinks, drop this patch again.
sound: include ALSA sound card id in /dev/snd/by-id/ links
If two USB sound cards that have the same serial number are plugged in
make sure the by-id/ device node symlink is unique at least during
runtime, by including the ALSA card id in the symlink name.
David Zeuthen [Sun, 8 Nov 2009 17:25:55 +0000 (12:25 -0500)]
gudev: Fix up GUdevDeviceNumber
Actually dev_t is an unsigned quad type (e.g. 64-bit even on 32-bit
x86) so defining it to be an integer is wrong and not future
proof. Thus, redefine it to actually be a dev_t (as originally wanted)
and instead add a work-around for GNOME bug #584517, see
https://bugzilla.gnome.org/show_bug.cgi?id=584517
for details. This way, GObject Introspection will still work.
This change is technically an API/ABI break but
- all released GUdev versions requires the user to understand that
the API/ABI is unstable by requiring the G_UDEV_API_IS_SUBJECT_TO_CHANGE
symbols to be defined
- functions using GUdevDeviceNumber are rarely used
sound: include ALSA sound card id in ID_ID property
If two USB sound cards that have the same serial number are plugged in
make sure ID_ID is unique at least during runtime, by including the ALSA
card id in the ID_ID string.
Fixes issues like this one:
http://pulseaudio.org/ticket/661
Kay Sievers [Wed, 4 Nov 2009 16:06:52 +0000 (17:06 +0100)]
udevd: create /dev/.udev/rules.d/ before watching it wit inotify
This should also address:
On Tue, Nov 3, 2009 at 16:21, Marco d'Itri <md@linux.it> wrote:
> udev_rules_new() in udev/udev-rules.c unconditionally creates the
> directory.
> This is a problem because the function is called also by e.g. udevadm
> test, and creating /dev/.udev/ when it does not exist is an unacceptable
> side effect which will break everything else that checks for its
> existence to know if udev is running.
Martin Pitt [Mon, 2 Nov 2009 23:03:43 +0000 (00:03 +0100)]
fix major fd leak in link handling
link_find_prioritized(): Properly close directory handles to fix a major fd
leak which caused hotplugging to fail entirely in many cases due to having too
many open files.
Kay Sievers [Sat, 31 Oct 2009 10:53:41 +0000 (11:53 +0100)]
unblock signals we might want to handle
On Thu, Oct 29, 2009 at 19:15, Christian P. Schmidt <schmidt@digadd.de> wrote:
> After the getty replaces itself with login the pam module pam_mount
> calls mount. This in turn determines that the partition to be mounted is
> LUKS encrypted, and calls cryptsetup. Cryptsetup receives the password,
> unlocks the partition, and calls udevadm settle in order to avoid some
> problems in interaction with LVM.
>
> udevadm settle never returns.
>
> The problem here is that SIGUSR1 and SIGALRM are both blocked in oldmask
> already, and never reach udevadm. No care is ever taken to ensure those
> signals are not blocked.