Age | Commit message (Collapse) | Author |
|
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.
|
|
The ID_CLASS property on input devices has been replaced by the more accurate
set of flags ID_INPUT_{KEYBOARD,KEYS,MOUSE,TOUCHPAD,TABLET,JOYSTICK}.
Rewrite 60-persistent-input.rules to use the new properties now and not export
ID_CLASS any more, since it is not used by anything else any more.
Add note about migration to NEWS, in case this is being used in custom rules.
|
|
ID_CLASS is deprecated for input devices. Use new ID_INPUT_JOYSTICK instead.
|
|
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.
|
|
# ls -l /dev/disk/by-id/wwn-0x500
wwn-0x500000e01b83f360 wwn-0x50014ee25578924f-part1
wwn-0x500000e01b83f440 wwn-0x50014ee25578924f-part2
wwn-0x500000e01b83f520 wwn-0x50014ee2aabdc41b
wwn-0x500000e01b843d90 wwn-0x50014ee2aabdc41b-part1
wwn-0x5000c50016359fd1 wwn-0x50014ee2aabdc41b-part2
wwn-0x50014ee0016eb4f5 wwn-0x5001517958cabd77
wwn-0x50014ee0016eb572 wwn-0x5001517958cabd77-part1
wwn-0x50014ee055d524e2 wwn-0x5001517958cabd77-part2
wwn-0x50014ee055d524e2-part1 wwn-0x5001517958d6a74e
wwn-0x50014ee055d524e2-part2 wwn-0x5001517958d6a74e-part1
wwn-0x50014ee1003d9c50 wwn-0x5001517958d6a74e-part2
wwn-0x50014ee1003d9c50-part1 wwn-0x50024e9200c0c693
wwn-0x50014ee1003d9c50-part2 wwn-0x50024e9200c0c694
wwn-0x50014ee1aac30d4e wwn-0x50024e9200c0c6ae
wwn-0x50014ee1aac30d4e-part1 wwn-0x50024e9200c0c6af
wwn-0x50014ee1aac30d4e-part2 wwn-0x50024e9200c0c6b0
wwn-0x50014ee25578924f wwn-0x50024e9200c0c6b1
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
Now that both ata_id and scsi_id exports the World Wide Name in the
ID_WWN property, use this to create persistent symlinks. Example
/dev/disk/by-id/wwn-0x500000e01b83f360 -> ../../sdn
/dev/disk/by-id/wwn-0x500000e01b83f440 -> ../../sdm
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
|
|
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.
|
|
This reverts commit 53842b53820a0f0b2b0ff5b28caf01e3f7e26f22.
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.
|
|
This reverts commit 5052297b6a8928d3ccfdd9996b71fdfff8bc8921.
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.
|
|
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
http://people.freedesktop.org/~david/FUJITSU-MAY2036RC-sas-disk-picture.jpg
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.
Note that ata_id also use the ID_WWN property since commit
66094a4a7fc1d303e80785d586800eae9841502b (2009-11-04).
Also print out ID_SCSI=1 so users of the udev database knows the disk
speaks SCSI.
Here's the scsi_id output from one of my SAS disks with these changes:
ID_SCSI=1
ID_VENDOR=FUJITSU
ID_VENDOR_ENC=FUJITSU\x20
ID_MODEL=MAY2036RC
ID_MODEL_ENC=MAY2036RC\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=0103
ID_TYPE=disk
ID_SERIAL=3500000e01b83f520
ID_SERIAL_SHORT=500000e01b83f520
ID_WWN=0x500000e01b83f520
ID_SCSI_SERIAL=B3G1P8500RWT
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
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
Some drives are reported to erase CD-RW media with the ATA
commands we send.
Thanks to Christoph Stritt <phoenix@jobob.com> for his debugging.
Original bug is here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556635
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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
https://bugzilla.gnome.org/show_bug.cgi?id=600273
for more information.
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
|
|
This reverts commit b15b08913800c4a2fad6530becca55b896f66984.
This breaks "make distcheck". The header is distributed in the tarball,
and does not live in builddir.
|
|
|
|
|
|
|
|
This reverts commit 68bffc607f7f0414fee77fa481d9c133ce0798e9.
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.
|
|
Since libudev is no longer unstable either.
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
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.
This is a followup to ed1b2d9fc7.
|
|
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
so we don't bump the so number.
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
https://launchpad.net/bugs/281335
|
|
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
|
|
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.
|
|
|
|
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.
https://launchpad.net/bugs/463347
|
|
udev-extras is gone, ask people to file bugs against udev.
|
|
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.
|
|
These retry loops are required where create_path() could race with
delete_path(). But only the main udevd process writes to the queue,
so no races will happen here.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
|
|
|
|
Don't use the [[:space:]] syntax in awk calls' regex, since that's GNU awk
specific. Thanks to Alan Jenkins for finding this.
|
|
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
Taken from hal-info commit e6389d9fa.
http://bugs.freedesktop.org/show_bug.cgi?id=21527
|
|
Taken from hal-info commit eba65779.
|
|
Its use breaks too many things which expect to be run from independent
later rules, and is an idication that something needs to be fixed
properly instead.
|
|
Dangling symlinks in path components return -ENOENT. Do not retry
to create the file in a loop in such case.
|
|
|
|
|
|
https://launchpad.net/bugs/215035
|
|
Calling usb_id and GOTO in one rule did not make sense at all.
|
|
For deciding whether to call usb_id, test the property which we are actually
querying further down.
https://launchpad.net/215035
|