Martin Pitt [Tue, 13 Apr 2010 13:25:48 +0000 (15:25 +0200)]
cdrom_id: Fix uninitialized buffers
Commit 5c6954f is actually a no-op, since static variables are already zero'ed
by default anyway (but we keep it for clarity). The real difference was that a
build with -O0 wor while a build with -O2 didn't.
Turns out that some ioctls do not actually touch the result buffer in some
cases, so we need to zero the result buffers to avoid interpreting random da as
CD properties.
Martin Pitt [Tue, 13 Apr 2010 08:49:24 +0000 (10:49 +0200)]
cdrom_id: Fix uninitialized variables
In cases where cdrom_id does not go through the entire code path and one of the
probing functions returns -1 or exits early, the remaining variables were never
initialized. This caused effects like "phantom" audio CDs on empty drives, or
bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528.
Initialize the variables right away to avoid that.
Kay Sievers [Tue, 13 Apr 2010 06:52:48 +0000 (08:52 +0200)]
remove "all_partitions" option
We can not predict the major/minor of non-existing devices:
$ grep . /sys/class/block/sd*/dev
/sys/class/block/sda1/dev:259:524288
/sys/class/block/sda2/dev:259:262144
/sys/class/block/sda3/dev:259:786432
/sys/class/block/sda4/dev:259:131072
/sys/class/block/sda/dev:259:0
/sys/class/block/sdb/dev:259:655360
/sys/class/block/sdc/dev:259:393216
If this functionality is still needed for some broken hardware, it needs to be
solved with a tool not part of the udev package. Because such option is unreliable
and unsafe to use.
Kay Sievers [Wed, 7 Apr 2010 07:24:25 +0000 (09:24 +0200)]
cdrom_id: retry to open the device, if EBUSY
We might fight about the device with polling processes, or other
users who probe the device. Retry a few times if the other one goes
away in the meantime.
Jerone Young [Mon, 5 Apr 2010 23:45:35 +0000 (18:45 -0500)]
Revert special casing 0xD8 to latitude XT only
Now that Dell has changed the functionality of upcoming machines with
touchpad toggle to only use keycode 0xD9 .. and not 0xD8 & 0xD9. It
seems best to add this back to the general map of Dell buttons. Just
incase a machine in the future uses this later.
Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Jerone Young [Thu, 25 Mar 2010 01:14:23 +0000 (20:14 -0500)]
Fix Keymapping for upcoming Dell Laptops
This patch fixes it so that new upcoming Dell machines will work
correctly if users presses the touchpad toggle key.
Currently 0xD8 is being mapped to sleep. Though this is only done by the
Latitude XT* laptops. Many upcoming Laptops from Dell are mapping this
key to "toogle touchpad off" .. giving the OS notification that it has
just turned off the touchpad.
Though their is an issue in that if this key is mapped the hardware
first toogles .. then the software tries to do the samething after, if
they fall out of sync ... no more touchpad. So leave out mapping these
keys for now.
Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Martin Pitt [Wed, 3 Mar 2010 23:48:59 +0000 (00:48 +0100)]
udev-acl: Correctly handle ENV{ACL_MANAGE}==0
When a custom rule sets ACL_MANAGE to 0 to disable ACL management for a
particular device, handle this as "disabled", by explicitly checking against
"1" instead of "nonempty".
A common use (e.g. in Ubuntu) for udevadm monitor is to log the events
received by udev during boot; events can be lost of the buffer size isn't
increased as udevd does.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Jerone Young [Sat, 13 Feb 2010 00:08:08 +0000 (18:08 -0600)]
Force key release for volume keys on Dell Studio 1557
Dell Studio 1557 does not generate a release code when the volume keys
are pressed, causing them to generate infinite key presses. This forces
key release of these keys.
Signed-off-by: Jerone Young <jerone.young@canonical.com> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Martin Pitt [Tue, 9 Feb 2010 14:47:47 +0000 (15:47 +0100)]
Fix brightness keys on MSI Wind U-100
The MSI Wind 100 generates ACPI/input events on the LNXVIDEO input device. On
top of that, the video module/BIOS synthesize some extra event on atkbd as an
echo of actually changing the brightness.
Ignore the wrong and useless atkbd ones, to avoid event loops.
Many thanks to Hans de Goede for tracking this down!
Thomas Bächler [Sun, 31 Jan 2010 12:49:02 +0000 (13:49 +0100)]
firmware: fix error reporting on missing firmware files
The new firmware loader does not report an error to the kernel if a firmware file
is missing. This results in modprobe stalling for 60 seconds for each firmware
a module tries to load.
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>