Kay Sievers [Mon, 25 Jan 2010 09:48:04 +0000 (10:48 +0100)]
delete outdated and unmaintained writing_udev_rules
Many statements in this document are no longer correct, or even
suggest things we do not want to support, or do not work at all
with the current version of udev.
Any new documentation should better be added to the udev man page,
which is usually kept up-to-date.
Amit Shah [Thu, 21 Jan 2010 13:15:04 +0000 (18:45 +0530)]
rules: Add symlink rule for virtio ports
virtio ports spawned by the virtio_console.c driver can have 'names'
assigned to them by hosts. The ports are distinguishable using these
names. Make a rule to create a symlink to the chardev associated for a
port with a name.
The symlink created is:
/dev/virtio-ports/org.libvirt.console0 -> /dev/vport0p0
if the first port for the first device was given a name of
'org.libvirt.console0'.
Martin Pitt [Wed, 20 Jan 2010 23:55:59 +0000 (00:55 +0100)]
keymap: move force-release directory
Move extras/keymap/keymaps/force-release/ to
extras/keymap/force-release-maps/, so that check-keymaps.sh does not stumble
over the directory. It's also a more logical source layout.
Kay Sievers [Wed, 13 Jan 2010 12:26:56 +0000 (13:26 +0100)]
libudev: device - create db file atomically
We need to prevent that libudev parses half-written database files.
Also for "change" events, we need to make sure, that database files
always exist to be read by libudev, and that they are not first deleted
before they are re-created.
Kay Sievers [Wed, 13 Jan 2010 12:18:14 +0000 (13:18 +0100)]
do not remove device nodes of active kernel devices
We do no longer delete the primary device node while handling "remove"
events if the same kernel device is already re-created in the meantime.
This prevents the asynchronously running udev from removing and re-creating
primary device nodes for active devices.
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