1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
Commit Graph

923 Commits

Author SHA1 Message Date
Bastien Nocera
a1ca5f60e0 extras/keymap: Make touchpad buttons consistent
We'll need to standardise on the Touchpad related keys in udev, kernel, and
X.org. I selected F21 for XF86TouchpadToggle, F22 for XF86TouchpadOn and F23
for XF86TouchpadOff.

See:
https://bugs.freedesktop.org/show_bug.cgi?id=31333

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-11-06 12:31:24 -04:00
Bastien Nocera
ecfad20871 keymap: Add force release for HP touchpad off
Force the touchpad off/on keys getting released, as they usually
only send a "repeat".

https://bugzilla.redhat.com/show_bug.cgi?id=623239

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-11-06 09:16:23 -04:00
David Zeuthen
560de57514 Use ata_id, not scsi_id, on ATAPI devices
The major benefit here, is that we get the ATAPI device serial
number. With SCSI ID we didn't get this since it's not part of the
SCSI INQUIRY command. Specifically this means that we get symlinks to
empty optical drives, e.g.

 /dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376

which we didn't get earlier. So this is a major win.

Also make ata_id work on CD-ROM devices when using /dev/bsg nodes so
this works on both the scsi_device as well as the block device. We do
this, basically, by issuing the ATA IDENTIFY PACKET DEVICE command
instead of the ATA IDENTIFY command. We also use 16-byte pass-through
ATA passthrough instead of 12-byte passthrough to avoid clashing with
the MMC BLANK command.

This means that we get this output

 # udevadm info -q all -p /sys/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 P: /devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: UDEV_LOG=3
 E: DEVPATH=/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: DEVTYPE=scsi_device
 E: DRIVER=sr
 E: MODALIAS=scsi:t-0x05
 E: SUBSYSTEM=scsi
 E: ID_ATA=1
 E: ID_TYPE=cd
 E: ID_BUS=ata
 E: ID_MODEL=VBOX_CD-ROM
 E: ID_MODEL_ENC=VBOX\x20CD-ROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x 20\x20\x20\x20\x20\x20\x20
 E: ID_REVISION=1.0
 E: ID_SERIAL=VBOX_CD-ROM_VB2-01700376
 E: ID_SERIAL_SHORT=VB2-01700376

instead of just

 # udevadm info -q all -p /sys/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 P: /devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: UDEV_LOG=3
 E: DEVPATH=/devices/pci0000:00/0000:00:01.1/host3/target3:0:0/3:0:0:0
 E: DEVTYPE=scsi_device
 E: DRIVER=sr
 E: MODALIAS=scsi:t-0x05
 E: SUBSYSTEM=scsi
 E: ID_SCSI=1
 E: ID_VENDOR=VBOX
 E: ID_VENDOR_ENC=VBOX\x20\x20\x20\x20
 E: ID_MODEL=CD-ROM
 E: ID_MODEL_ENC=CD-ROM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
 E: ID_REVISION=1.0
 E: ID_TYPE=cd

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-11-04 13:29:38 -04:00
David Zeuthen
6992637e31 ata_id: Support SG_IO version 4 interface
This makes it possible to use /dev/bsg/* nodes for ata_id:

 # /lib/udev/ata_id --export /dev/bsg/0\:0\:0\:0
 ID_ATA=1
 ID_TYPE=disk
 ID_BUS=ata
 ID_MODEL=INTEL_SSDSA2MH080G1GC
 ID_MODEL_ENC=INTEL\x20SSDSA2MH080G1GC\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
 ID_REVISION=045C8802
 [...]

This means that our cd-rom detection as per commit

 http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=160b069c25690bfb0c785994c7c3710289179107

needs to be reworked since we can't just use the CDROM_GET_CAPABILITY
ioctl on a /dev/bsg node (which is a character device). We do this by
just sending the SCSI INQUIRY command and checking the type (CD-ROM's
are all type 0x05 and disks are type 0x00) before we issue the ATA
IDENTIFY command through the SCSI command ATA PASS_THROUGH (12).

 (Yes, it's a bit perverse how we have to tunnel our ATA commands
 through a SCSI command  but that's how Linux currently work.)

We still support for SG_IO version 3 (we fail back if version 4 fails
with EINVAL) because testing reveals that some drivers (such as
mpt2sas) still only support version 3 on the block nodes.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-30 13:03:00 -04:00
Jan Drzewiecki
d43e5e5b5a cdrom_id: Fix media state for unreadable DVDs
If the disc is unreadable and reading of the first 32 blocks fails set the
cd_media status to 0 (not present). This will prevent udev from executing blkid
next that tries to determine fs on the disc and which in this case may seem to
hang forever locking the drive.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-10-26 12:10:57 -04:00
Martin Pitt
81956ed1dc keymap: Add some more Sony Vaio VGN-* models
https://launchpad.net/bugs/627890
2010-10-25 22:11:37 -04:00
Martin Pitt
2f151e0fbf keymap: Add Sony Vaio VGN71
https://launchpad.net/bugs/625770
2010-10-25 22:01:03 -04:00
Martin Pitt
a74beafdcc keymap: Add Toshiba Satellite U500
https://launchpad.net/bugs/271706
2010-10-22 12:52:45 +02:00
Martin Pitt
60d19551d8 keymap: Apply force-release rules to all Samsung models.
The force-release list for Samsung is already an ultralong monster, and
reportedly still incomplete (see https://launchpad.net/bugs/574250).
Give up and instead apply the force-release quirk to all Samsung models. The
worst that can happen is that autorepeat behaves a bit weird, but that's much
better than a complete freeze after each keypress.
2010-10-13 18:08:41 +02:00
Harald Hoyer
d7cd2b1611 cdrom_id: request the drive profile features with a dynamic length
Some drives don't like huge feature buffers, so we query twice. First
run for the current profile and to get the length.
Second time we query the whole profile feature set.
2010-10-07 17:43:05 +02:00
Martin Pitt
1ebd2a5620 cdrom_id: Don't read beyond "last track" in TOC
Read the first and last track from the TOC header, and do not go beyond that
stated number of tracks when reading the TOC. Otherwise we interpret random
data which leads to bogus tracks. (Reported on an IronKey, which reported 1
data track, and 4 audio tracks which weren't actually present.)
2010-10-05 17:56:19 +02:00
Martin Pitt
678df8a461 cdrom_id: Fall back to CDROM_DRIVE_STATUS if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if
cd_media_compat() detected that there is a disc present, and assume that we
have a CD-ROM medium.
2010-10-05 14:59:51 +02:00
Martin Pitt
13e0fca5df Revert "cdrom_id: Try reading the medium if all MMC commands fail"
Turns out we can do this much simpler by assuming that cd_media_compat() works,
which seems to be the case for the IronKey.

This reverts commit ea88774a92.
2010-10-05 14:57:04 +02:00
Martin Pitt
ea88774a92 cdrom_id: Try reading the medium if all MMC commands fail
Reportedly, some "when I'm grown up I want to be a CD drive" fake USB CD sticks
like the IronKey neither support the SCSI "GET CONFIGURATION" nor the older
(pre-MMC2) "READ DISC INFORMATION" command. In that case, check if we can read
data from the drive, and assume that we have a CD-ROM medium if it succeeds.
2010-10-05 14:34:55 +02:00
Lee, Chun-Yi
e17f9c3cd5 keymap: Add alternate MSI vendor name
Add new vendor name "Micro-Star International" in 95-keymap.rules.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-09-25 11:29:08 +02:00
Torsten Schoenfeld
daef8ae33c gudev: add a few annotations that newer gobject-introspection versions demand 2010-09-20 10:25:55 +02:00
Martin Pitt
2f5e49cd87 keymap: Add Lenovo Y550
https://launchpad.net/bugs/543065
2010-09-14 18:21:13 +02:00
David Zeuthen
cbdf255e25 gudev: Deliver ::uevent signal in the thread-default main loop
... that the GUdevClient object was constructed in. This change makes
GUdev follow the GLib guidelines and, more importantly, makes it
possible to actually use the library in a multi-threaded
application. Prior to this patch, signals were emitted in the thread
that ran the "default" main loop.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-07 11:04:57 -04:00
Kay Sievers
cff2f9a3c8 scsi_id: fix compiler warnings 2010-09-07 08:24:12 +02:00
Hannes Reinecke
db11b20e41 scsi_id: export target port group
For ALUA support it's useful to have the target port group number
of a device.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2010-09-07 08:22:05 +02:00
Kay Sievers
f74310b4a0 Revert "Add alternative KVM MAC address blacklist"
This reverts commit 634afac119.

54:52:00 was just a bug in libvirt, and that's better fixed locally,
and we should not carry it in udev rules.
2010-09-03 14:08:14 +02:00
Martin Pitt
634afac119 Add alternative KVM MAC address blacklist
Reportedly, older KVM/Qemu instances indeed do use 54:52:00:*,
so add this as an alternative.
2010-09-02 11:11:32 +02:00
Martin Pitt
d4de0a0321 do not create persistent name rules for VMWare network interfaces
Not generating persistent MAC address rules will significantly ease cloning of
VMs.  The kernel reliably sorts eth* enumeration by bus number, so as long as
you only have cards from one vendor (or more precisely, drivers), the
enumeration will be stable. Having cards from different vendors is very
unlikely in VMs.

KVM was already covered in the previous commit, this is the equivalent
blacklist for VMWare:

  http://www.coffer.com/mac_find/?string=005056
  http://www.coffer.com/mac_find/?string=000c29

https://launchpad.net/bugs/341006
2010-09-02 08:39:12 +02:00
Martin Pitt
c03180194c Fix KVM MAC address range
KVM uses 52:54:00:* MACs:

  http://git.savannah.gnu.org/cgit/qemu.git/tree/net.c#n796
2010-09-02 08:32:43 +02:00
Marco d'Itri
af29bf0966 do not create persistent name rules for KVM network interfaces
The virtual interfaces created by KVM are stable, 54:52:00 is the MAC-48
range of KVM.
2010-08-31 21:44:34 +02:00
Jan Drzewiecki
5e267ea5a3 cdrom_id: Fix DVD blank detection for sloppy firmware
Reportedly, many CD drive firmwares will only consider the MSB in a READ
command, thus if we request 17 blocks to be read, we'll actually only get 16 in
many cases, and thus miss out the interesting sector #17. This would lead to
falsely considering nonempty DVDs as blank.

Fetch 32 blocks now, which should work everywhere.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-31 00:41:35 +02:00
Martin Pitt
2458db3edd cdrom_id: Fix DVD-RW media detection
Commit cf2205a19 applied the "restricted overwrite" vs. "sequential" DVD-RW
test to feature_profiles() (which reads the drive capabilities), which caused
every DVD medium to be detected as ID_CDROM_MEDIA_DVD_RW. Now apply it to
cd_profiles() instead, to just check the current profile.
2010-08-30 15:33:26 +02:00
Martin Pitt
d17c065e28 keymap: Fix Acer TravelMate 4720
The previous change just fixed the Bluetooth key, but Screen Lock and Browser
also need to be changed.

https://launchpad.net/bugs/569815
2010-08-27 18:48:53 +02:00
Martin Pitt
e4dcdc4ab2 gudev: fix crash if netlink is not available
gudev_client_new() assumes that priv->monitor is never NULL, but this happens
on older kernels. Let's not crash client programs because of that.

https://launchpad.net/bugs/581527
2010-08-27 18:12:59 +02:00
Martin Pitt
38b5ccbcf7 keymap: Fix Sony VAIO VGN-SZ2HP/B
Reportedly this needs the module-sony keymap, not the -old one.

https://launchpad.net/bugs/613578
2010-08-25 17:02:51 +02:00
Martin Pitt
92cffb0bd1 keymap: Add HP G60
https://launchpad.net/bugs/554944
2010-08-23 10:47:28 +02:00
Martin Pitt
acf865b68e keymap: Add Onkyo PC
Thanks to Pau Oliva!

https://launchpad.net/bugs/612529
2010-08-22 11:00:34 +02:00
Marco d'Itri
3bd7b89dc4 udev-acl: do not mistake all SCSI "processor" devices for scanner
Both rules can be removed since now libsane sets libsane_matched also
for SCSI scanners.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589751
2010-08-18 13:35:25 +02:00
Jan Drzewiecki
b367a1c9d8 cdrom_id: Drop MEDIA_SESSION_NEXT for DVD-RW-RO
Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite
mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT
property either, since in that mode you can never append tracks/sessions; this
just works in sequential mode.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-13 07:27:30 +02:00
David Woodhouse
9cd075e35b Add keymap for Lenovo IdeaPad S10-3
Tested on S10-3, but presumably applicable to all IdeaPads.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-12 20:13:26 +02:00
Martin Pitt
24af530a54 cdrom_id: Add media status debugging
Show which media status the hardware originally reports, since we mangle it in
some cases.
2010-08-12 07:10:12 +02:00
Kay Sievers
4f7f02b7ba cdrom_id: do not bail out when we can not read the TOC like for empty CDRW 2010-08-11 15:38:48 +02:00
Harald Hoyer
1b3b6c2df7 cdrom_id: READ TOC before READ DISC INFORMATION fixes qemu 2010-08-11 15:21:33 +02:00
Kay Sievers
36b6aca5c1 cdrom_id: whitespace fix 2010-08-11 15:04:05 +02:00
Jan Drzewiecki
cf2205a198 cdrom_id: Fix state for fresh DVD-RW
Fresh DVD-RW in restricted overwite mode reports itself as "appendable"; change
it to "blank" to make it consistent with what gets reported after blanking, and
what userspace expects.

For the exotic case where some uses multi-track recording on a DVD-RW in
sequential mode, we need to tell apart sequential and restricted overwrite
modes, so keep separate states for them internally.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-10 23:37:14 +02:00
Harald Hoyer
ef5304bc8d rule_generator/write_net_rules: prevent interface to be named "eth"
find_next_available() would return "eth" instead of "eth0"
2010-08-10 16:48:37 +02:00
Richard Hughes
2d57b4f8ec udev-acl: add DDC_DEVICE to the types that are managed
DDC_DEVICEs are control points for high-end monitors such as the
HP DreamColor. The DDC/CI interface allows userspace applications
to upload custom colorspaces and interact with the display without
using the monitor hardware controls.
2010-08-10 08:04:37 +02:00
Jan Drzewiecki
45b1d780b9 cdrom_id: No "next session" for "other" media state
"other" is known to apply to DVD-RAMs, where sessions can't be appended.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 19:22:13 +02:00
Jan Drzewiecki
a6b03c0961 cdrom_id: Also apply format check to DVD-RW
Extend the DVD+RW/DVD-RAM check in commit 1ef6c9e to also cover DVD-RW, since
in "restricted overwrite" mode they behave similar to DVD+RW.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 19:19:07 +02:00
Jan Drzewiecki
d83dfabe0d cdrom_id: Handle pre-MMC2 drives
Those do not yet support the 0x46 "GET CONFIGURATION" support. If we have
those, fall back to the 0x51 "READ DISC INFORMATION" call. This can only
differentiate between CD-RW and CD-R, but first that's better than a complete
detection failure, and second, those old drives likely don't support more
modern media in the first place.

https://launchpad.net/bugs/502143

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 17:57:47 +02:00
Jan Drzewiecki
1ef6c9e9f0 cdrom_id: Fix detection of reblanked DVD+RW and DVD-RAM
Once formatted, DVD+RW and DVD-RAM discs are always reported "complete" by the
drive. Check the if the Volume Descriptor or Volume Descriptor Anchor sectors
are empty, and if so, set the status to blank. If the disc is unformatted the
blank status is maintained and no reads are issued. If the disc is formatted and
read command fails, the status remains set to complete to avoid accidental
blanking.

Bug-Ubuntu: https://launchpad.net/bugs/581925

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-08-08 17:47:08 +02:00
Kay Sievers
232f180397 udev-acl: remove specific device matches from the rules file
We should do only do classes of devices, not individual pieces
of hardware.

There is no way for us to manage this in the long term, and it needs
to be thought through what we want here, but it surely isn't a list of
smartphones in the udev source tarball installed on all systems.
2010-08-05 18:55:57 +02:00
Michal Schmidt
9ac90ae153 udev-acl: really fix ACL assignment in CK events
The previous fix for udev-acl was incomplete. The ACL were not properly
assigned to the new user when switching from root's session because of
the test for 'uid != 0'.

Centralize the special handling of root to a single place (in set_facl).

https://bugzilla.redhat.com/show_bug.cgi?id=608712
2010-08-04 12:01:53 +02:00
Kay Sievers
939cc18afc udev-acl: properly handle CK change events for root user
mschmidt@redhat.com writes:
> since root is treated specially, it does not do anything!
> udev-acl may want to prevent removing ACLs from root, but
> it must not stop the ACLs being granted to the user of the
> new session.

https://bugzilla.redhat.com/show_bug.cgi?id=608712
2010-08-03 15:09:46 +02:00
Fortunato Ventre
5047f82de4 keymap: Add force-release quirks for a lot more Samsung models
https://launchpad.net/bugs/554066
2010-08-01 22:03:30 +02:00
Martin Pitt
c9fbbd6ea2 keymap: Generalize Samsung keymaps
Fortunato Ventre (voRia) <vorione@gmail.com> reports a lot more Samsung models
which need the "samsung-other" keymap. Instead of eternally playing catchup,
apply it to all Samsung models for now, and keep the two known special cases.

https://launchpad.net/bugs/554066
2010-08-01 21:59:58 +02:00
Marco d'Itri
efb27d6465 hid2hci: fix for Logitech diNovo Edge keyboard 2010-07-23 12:08:31 +02:00
Marco d'Itri
a466c239a9 hid2hci: fix Logitech diNovo, MX5500 and other keyboards 2010-07-19 10:37:41 +02:00
Jerone Young
85c3d3b032 Fix volume keys not releasing on Mivvy G310
keymap: add My Mivvy G310

Fixes volume keys not sending key release on My Mivvy G310 laptop.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-07-16 06:44:24 +02:00
Kay Sievers
2ffb33bdec udev-acl: update firewire matches to recent rule changes 2010-07-15 11:38:14 +02:00
Martin Pitt
c3b3a979ee keymap: Add Lenovo ThinkPad SL Series extra buttons
Sent by Quentin Denis <quentin.denis@gmail.com> via private mail.
2010-07-07 23:18:19 +02:00
Martin Pitt
fc799aa6b6 keymap: Find alternate Lenovo module
Newer Lenovos apparently have a lower case "extra buttons" module, cover this
as well.

Sent by Quentin Denis <quentin.denis@gmail.com> via private mail.
2010-07-07 23:17:11 +02:00
Martin Pitt
0fade61274 keymap: Add Logitech Cordless Wave Pro
https://launchpad.net/bugs/592371
2010-07-05 09:35:36 +02:00
Matthew Garrett
8bc376a373 keymap: Add support for IBM-branded USB devices
These seem to use a different layout to the Lenovo-branded devices

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-07-02 15:52:07 +02:00
Ryan Harper
8741f2defa Add virtio-blk support to path_id
This patch adds a case handling path_id invoked on a virtio-blk device.
Currently path_id walks the parent path to virtio-pci but doesn't know
that it's the end of the path and exits without building the path (providing no
output resulting in no disk/by-path symlinks to virtio-blk devices).
This patch handles the virtio-pci path and updates the path accordingly.

/lib/udev/path_id --debug /block/vda
udev_device_new_from_syspath: device 0x2300120 has devpath '/devices/virtio-pci/virtio1/block/vda'
udev_device_new_from_syspath: device 0x2300380 has devpath '/devices/virtio-pci/virtio1'
udev_device_new_from_syspath: device 0x2300670 has devpath '/devices/virtio-pci'
ID_PATH=virtio-pci-virtio1

And with the current persistent-storage rules generates:

% ls -al /dev/disk/by-path | grep vda
lrwxrwxrwx. 1 root root   9 Jun  1 22:09 virtio-pci-virtio1 -> ../../vda

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
2010-06-29 17:22:49 +02:00
Jerone Young
310f2896eb Fix stuck volume key presses for Toshiba Satellite U300 & U305models
This patch fixes stuck volume keys for Toshiba Satellite models U300 &
U305.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-06-28 09:14:21 +02:00
Kay Sievers
8b5651bb00 switch a few left-over from GPLv2 to GPLv2 or later 2010-06-25 11:39:21 +02:00
Kay Sievers
08b4c88353 make: pre-process and install systemd service files when needed 2010-06-25 10:30:55 +02:00
Kay Sievers
5f307a98fa mtd_probe: add needed include, modprobe blacklist flag, and change some whitespace 2010-06-23 22:29:58 +02:00
Maxim Levitsky
674c3412bb mtd_probe: add autodetection for xD cards
commit 2599cabd36770785a13bf884049d649d385fd80c
Author: Maxim Levitsky <maximlevitsky@gmail.com>
Date:   Fri Jun 18 02:08:48 2010 +0300

Add autodetection for xD/smartmedia cards
This can easily be extended for other types of FTL

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
2010-06-23 22:20:29 +02:00
Kay Sievers
e0f83fbe86 remove a few comments in file headers 2010-06-21 16:56:17 +02:00
Harald Hoyer
eb2de7acdb extras/keymap: add Samsung N210 to keymap rules
https://bugzilla.redhat.com/show_bug.cgi?id=606302

Thanks to John Floyd!
2010-06-21 14:06:54 +02:00
Martin Pitt
dcaa863948 Revert "add Vala vapi for gudev-1.0"
Argh, recent vala already ships with a gudev vapi.

This reverts commit 6a7b5ec771.
2010-06-13 10:08:22 +02:00
Martin Pitt
6a7b5ec771 add Vala vapi for gudev-1.0
Add gudev-1.0.vapi. This is based on the output of

  vapigen  --library gudev-1.0 GUdev-1.0.gir

with fixes to array/list semantics and include file names.
2010-06-13 00:47:16 +02:00
Martin Pitt
ba854cf8c3 Fix hid2hci rules harder
Commit 2b463cb0 changed the rules to match against hiddev* for all devices in
an attempt to fix Debian #567237/LP #444420. However, this caused regressions
with other devices (e. g. LP #550288) and thus was reverted in commit 8b56ba.

Now use hidraw* for the devices where it's confirmed that they only work with
that, and hiddev* for the others.

https://launchpad.net/bugs/444420
2010-06-11 15:14:55 +02:00
Jerone Young
ca3fe48dc3 Fix wlan key on Inspiron 1010 & 1110
This fixes wlan key on Inspirion 1010 & 1110.

This patch depends on previous patches sent.

The issue with all of these is that they were all Dell mini & it wasn't
noticed till recent that they all did not follow the standard that the
rest of Dell machines follow.

Also to note while this fixes the wlan key sending the proper key press,
work is still needed at the kernel level for complete support.

This is the last patch all the Dell minis have been verified to all have
this issue, and are now covered.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-06-02 08:59:05 +02:00
Jerone Young
a07c29ca19 Fix wlan key on Inspiron 910
This fixes the wlan key on Inspiron 910.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-05-30 21:37:58 +02:00
Jerone Young
7afe4ccd1e Fix wlan key on Inspirion 1210
This fixed wlan key on Inspirion 1210 machines.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-05-29 19:32:18 +02:00
Kay Sievers
898e5d4ca5 cdrom_id: do not export ID_CDROM_MEDIA_SESSION_LAST_OFFSET= for single session media 2010-05-25 09:47:04 +02:00
Yin Kangkai
422449339a keymap: Add keymap quirk of WebCam key for MSI netbooks.
I've verified that this patch fixes MSI U100, N014, U135
http://bugs.meego.com/show_bug.cgi?id=1741

Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-05-09 18:01:51 +02:00
Yin Kangkai
417ec5a850 keymap: Add keymap and force-release quirk for Samsung N128
http://bugs.meego.com/show_bug.cgi?id=1530

Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-05-06 16:00:54 +02:00
Harald Hoyer
2d01980f1a cdrom_id: only mark sr[0-9]* as ID_CDROM
we cannot be sure for xvd*
2010-05-04 09:09:32 +02:00
Martin Pitt
ad3d419843 keymap: Fix Bluetooth key on Acer TravelMate 4720
https://launchpad.net/bugs/569815
2010-04-26 08:28:36 +02:00
Kay Sievers
1dbfbfbea6 use the usual TAG+=, TAG= logic 2010-04-22 19:03:11 +02:00
Kay Sievers
f24362441f udev-acl: use a tag instead of a property to mark devices 2010-04-22 18:33:49 +02:00
Jerone Young
d05137cca5 Fix volume keys not releasing for Pegatron platform
Pegatron has a new platform coming out being sold by many small
manufacturers. This platform has volume keys that are not sending a key
release. This patch ensures those keys send release.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-04-21 19:35:12 +02:00
Yury G. Kudryashov
4101ce14b3 configure.ac: ddd --with-firmware-path option
In NixOS we need to use non-standard firmware path: we have no /lib.
2010-04-20 07:02:58 +02:00
Yury G. Kudryashov
d5a4ca9dfe hid2hci: include linux/types.h for __u32 2010-04-20 06:57:58 +02:00
Kay Sievers
8b56bada9a Revert "Fix switching Logitech bluetooth adapters into hci mode."
This reverts commit 2b463cb050.
2010-04-19 15:10:34 +02:00
Kamal Mostafa
23c455b887 keymap: Add force-release quirk for Mitac 8050QDA
https://launchpad.net/bugs/374884

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-04-19 08:56:45 +02:00
Kamal Mostafa
af3f56ff71 keymap: Add force-release quirk for Coolbox QBook 270-02
https://launchpad.net/bugs/420473

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-04-19 08:54:04 +02:00
Kamal Mostafa
db57bdda04 keymap: Unite laptop models needing common volume-key release quirk
Many laptop models need the same volume-key release quirk. Currently, two
models have identical force-release-maps/ keymap files (dell-studio-1557 and
fujitsu-amilo-si1848) and two more need to be added (Mitac and Coolbox QBook).

This replaces the identical force-release-maps files with one
'common-volume-keys' file to make adding new models easier.

There is no obvious DMI commonality between the models needing the quirk (i.e.
they do not all share the same BIOS), so it will remain necessary to scan for
each model separately in 95-keyboard-force-release.rules.

https://launchpad.net/bugs/565459

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2010-04-19 08:48:34 +02:00
Kay Sievers
bc913ce478 cdrom_id: set ID_CDROM_MEDIA=1 only for known media
On Sat, Apr 17, 2010 at 18:26, Mike Brudevold <mike@brudevold.com> wrote:
> My CD-RW drive experiences a problem in that it automatically closes
> after opening if there is media in the drive.  This only happens if
> there was media in the drive when it was last closed (an empty drive
> stays open).
...
> cd_profiles: current profile 0x02
> cd_profiles: profile 0x02 <ignored>
...

Do not pretend to have a media, when we receive a profile like 0x02,
which just means "Removable disk".

Thanks to Mike Brudevold for the initial patch.
2010-04-17 19:31:44 +02:00
Mike Brudevold
7c07740ce7 cdrom_id: add missing profiles to feature_profiles
Signed-off-by: Mike Brudevold <mike@brudevold.com>
2010-04-16 07:39:56 +02:00
Martin Pitt
30e3b1a0d3 cdrom_id: Swap media state and TOC info probing
Blank CDs do not have a TOC, thus will fail cd_media_toc() (at least with the
"Do not ignore errors from scsi_cmd_run()" fix). Thus probe the media state
first, so that we can properly detect blank media.
2010-04-15 21:29:18 +02:00
Martin Pitt
58e178894b cdrom_id: Do not ignore errors from scsi_cmd_run()
scsi_cmd_run() can return positive error messages if we have CHECK_CONDITION
set and get the error code from the SCSI command result. So check the result
for non-zero, not for being negative.

This should fix another cause for "phantom" media in empty CD-ROM drives.

Thanks to Mike Brudevold <mike@brudevold.com> for spotting this!

https://launchpad.net/bugs/562978
2010-04-15 21:29:17 +02:00
Kay Sievers
a60b077a46 cdrom_id: debug - print feature values in hex 2010-04-15 21:22:38 +02:00
Kay Sievers
140647ad1a cdrom_id: debug - print feature values in hex 2010-04-15 21:18:21 +02:00
Kay Sievers
2e9df19818 cdrom_id: print more debug messages 2010-04-15 20:48:04 +02:00
Kay Sievers
0413a47ebf cdrom_id: rework feature/profiles buffer parsing 2010-04-15 20:07:07 +02:00
Kay Sievers
c1b7f60dea update NEWS 2010-04-14 17:00:57 +02:00
Martin Pitt
2b861dc927 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.

https://launchpad.net/bugs/559723
https://launchpad.net/bugs/561585
2010-04-13 15:25:48 +02:00
Martin Pitt
816e6bf0fb 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.

Bug-Ubuntu: https://launchpad.net/bugs/559723
2010-04-13 10:49:24 +02:00
Kay Sievers
4b06c40935 replace "add|change" with "!remove" 2010-04-12 16:52:41 +02:00
Kay Sievers
86dc9133f8 usb-db: remove double '/' 2010-04-12 16:10:05 +02:00