IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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>
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>
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>
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>
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.
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.
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.)
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.
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.
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.
... 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>
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=005056http://www.coffer.com/mac_find/?string=000c29https://launchpad.net/bugs/341006
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>
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.
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
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>
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>
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.
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>
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>
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>
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.
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
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
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>
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.
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>
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>
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.
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
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>
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>
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>
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>
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.
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.
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
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/559723https://launchpad.net/bugs/561585
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