chiark / gitweb /
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.
Kay Sievers [Thu, 3 Dec 2009 12:31:43 +0000 (13:31 +0100)]
configure.ac: version bump
Kay Sievers [Thu, 3 Dec 2009 12:31:27 +0000 (13:31 +0100)]
libudev: doc - use #NULL
Martin Pitt [Thu, 3 Dec 2009 12:25:19 +0000 (13:25 +0100)]
udev_device_get_parent_with_subsystem_devtype(): Clarify documentation
devtype can be NULL, in which case it is ignored for matching.
Dmitry Torokhov [Thu, 3 Dec 2009 12:20:10 +0000 (13:20 +0100)]
input-id: identify touchscreens
Add detection of touchscreens to the input-id utility.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Martin Pitt [Thu, 3 Dec 2009 12:15:50 +0000 (13:15 +0100)]
input_id: Check mouse button for ID_INPUT_MOUSE
Before we bless an input device as a mouse, verify that it has a left button
(BTN_MOUSE).
Thanks to Dmitry Torokhov <dtor@mail.ru> for pointing out!
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.
Thanks to Dmitry Torokhov for pointing out!
Martin Pitt [Thu, 3 Dec 2009 11:46:22 +0000 (12:46 +0100)]
input_id: small optimization
In the parent traversal loop, use
udev_device_get_parent_with_subsystem_devtype() to only grab "input" class
devices.
Martin Pitt [Thu, 3 Dec 2009 09:22:04 +0000 (10:22 +0100)]
input_id: Do not tag non-input devices with ID_INPUT
Current rules only call it for input devices, but let's be correct.
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.
Kay Sievers [Wed, 2 Dec 2009 11:58:47 +0000 (12:58 +0100)]
release 148
Kay Sievers [Wed, 2 Dec 2009 11:56:06 +0000 (12:56 +0100)]
Revert "Fix out-of-tree builds"
This reverts commit
326e15a8ed97a22f2fe52d203896763d75f93c2c.
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.
Scott James Remnant [Wed, 2 Dec 2009 01:20:03 +0000 (01:20 +0000)]
Fix out-of-tree builds
gudevenumtypes.h won't be under $(top_srcdir) when built out-of-tree
from GIT.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
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 18:16:09 +0000 (19:16 +0100)]
input: Deprecate ENV{ID_CLASS}
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.
Martin Pitt [Mon, 30 Nov 2009 17:46:51 +0000 (18:46 +0100)]
70-acl.rules: Use new-style input properties
ID_CLASS is deprecated for input devices. Use new ID_INPUT_JOYSTICK instead.
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.
David Zeuthen [Wed, 25 Nov 2009 16:17:54 +0000 (11:17 -0500)]
Also create /dev/disk/by-id/wwn-0x..-part%n symlinks for partitions
# 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>
David Zeuthen [Wed, 25 Nov 2009 16:06:10 +0000 (11:06 -0500)]
Create /dev/disk/by-id/wwn-0x... symlinks
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>
Daniel Mierswa [Tue, 24 Nov 2009 05:22:03 +0000 (06:22 +0100)]
Fix typo in NEWS, ConsoleKit-0.4.11 -> 0.4.1
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
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.
Dan Williams [Mon, 23 Nov 2009 21:52:08 +0000 (13:52 -0800)]
Revert "extras/modem-modeswitch: Add Huawei E1550 GSM modem"
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.
Dan Williams [Mon, 23 Nov 2009 21:51:11 +0000 (13:51 -0800)]
Revert "modem-modeswitch: add a device"
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.
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
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>
Martin Pitt [Sat, 21 Nov 2009 00:22:53 +0000 (18:22 -0600)]
README.keymap.txt: small clarification
Kay Sievers [Fri, 20 Nov 2009 02:03:27 +0000 (03:03 +0100)]
ata_id: skip ATA commands if we find an optical drive
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
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 22:48:58 +0000 (23:48 +0100)]
udev-test.pl: catch-up with recent changes
Kay Sievers [Mon, 16 Nov 2009 22:40:27 +0000 (23:40 +0100)]
test-udev: remove "ignore_device" code
Kay Sievers [Mon, 16 Nov 2009 22:39:33 +0000 (23:39 +0100)]
print warning for BUS=, SYSFS{}=, ID=
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.
Harald Hoyer [Thu, 12 Nov 2009 21:17:47 +0000 (22:17 +0100)]
modem-modeswitch: add a device
Kay Sievers [Thu, 12 Nov 2009 20:52:51 +0000 (21:52 +0100)]
rules: set mode of floppy device nodes to 0660
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
https://bugzilla.gnome.org/show_bug.cgi?id=600273
for more information.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Kay Sievers [Tue, 10 Nov 2009 14:35:11 +0000 (15:35 +0100)]
release 147
Kay Sievers [Tue, 10 Nov 2009 14:09:27 +0000 (15:09 +0100)]
Revert "gudev: fix out-of-tree build"
This reverts commit
b15b08913800c4a2fad6530becca55b896f66984.
This breaks "make distcheck". The header is distributed in the tarball,
and does not live in builddir.
Kay Sievers [Tue, 10 Nov 2009 05:49:02 +0000 (06:49 +0100)]
update NEWS
Marco d'Itri [Tue, 10 Nov 2009 05:35:20 +0000 (06:35 +0100)]
gudev: fix out-of-tree build
Kay Sievers [Tue, 10 Nov 2009 05:31:13 +0000 (06:31 +0100)]
gudev: fix pkg-config call to work with "make distcheck"
Lennart Poettering [Mon, 9 Nov 2009 22:19:04 +0000 (23:19 +0100)]
Revert "sound: include ALSA sound card id in /dev/snd/by-id/ links"
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.
David Zeuthen [Mon, 9 Nov 2009 21:30:18 +0000 (16:30 -0500)]
gudev: Remove LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE from priv header
Since libudev is no longer unstable either.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Lennart Poettering [Mon, 9 Nov 2009 21:11:29 +0000 (22:11 +0100)]
sound: include ALSA sound card id in /dev/snd/by-id/ links
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.
David Zeuthen [Sun, 8 Nov 2009 17:25:55 +0000 (12:25 -0500)]
gudev: Fix up GUdevDeviceNumber
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>
Martin Pitt [Thu, 5 Nov 2009 22:56:28 +0000 (23:56 +0100)]
modem-modeswitch: fix ZTE MF6xx rule
https://launchpad.net/bugs/281335
Lennart Poettering [Thu, 5 Nov 2009 03:32:41 +0000 (04:32 +0100)]
sound: include ALSA sound card id in ID_ID property
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
Kay Sievers [Wed, 4 Nov 2009 16:06:52 +0000 (17:06 +0100)]
udevd: create /dev/.udev/rules.d/ before watching it wit inotify
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.
David Zeuthen [Wed, 4 Nov 2009 15:34:22 +0000 (16:34 +0100)]
ata_id: export more advanced ATA features
Martin Pitt [Mon, 2 Nov 2009 23:03:43 +0000 (00:03 +0100)]
fix major fd leak in link handling
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
Martin Pitt [Mon, 2 Nov 2009 15:22:14 +0000 (16:22 +0100)]
extras/keymap/README.keymap.txt: Fix bug report link
udev-extras is gone, ask people to file bugs against udev.
Kay Sievers [Sat, 31 Oct 2009 10:53:41 +0000 (11:53 +0100)]
unblock signals we might want to handle
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.
Alan Jenkins [Thu, 29 Oct 2009 18:02:33 +0000 (18:02 +0000)]
udevd: queue-export - remove retry loop
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>
Kay Sievers [Fri, 30 Oct 2009 11:31:59 +0000 (12:31 +0100)]
use CLOEXEC flags instead of fcntl()
Martin Pitt [Fri, 30 Oct 2009 08:38:21 +0000 (09:38 +0100)]
Makefile.am: fix build with mawk
Don't use the [[:space:]] syntax in awk calls' regex, since that's GNU awk
specific. Thanks to Alan Jenkins for finding this.
David Zeuthen [Thu, 29 Oct 2009 17:44:58 +0000 (18:44 +0100)]
gudev: remove G_UDEV_API_IS_SUBJECT_TO_CHANGE since API is now stable
Signed-off-by: David Zeuthen <davidz@redhat.com>
Martin Pitt [Thu, 29 Oct 2009 12:23:14 +0000 (13:23 +0100)]
keymap: add HP 2230s
Taken from hal-info commit
e6389d9fa.
http://bugs.freedesktop.org/show_bug.cgi?id=21527
Martin Pitt [Thu, 29 Oct 2009 12:21:07 +0000 (13:21 +0100)]
keymap: add HP Pavillion dv6315ea
Taken from hal-info commit
eba65779.
Kay Sievers [Wed, 28 Oct 2009 10:45:32 +0000 (11:45 +0100)]
remove "last_rule" option
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.
Kay Sievers [Wed, 28 Oct 2009 10:37:20 +0000 (11:37 +0100)]
break loops if util_create_path() returns error
Dangling symlinks in path components return -ENOENT. Do not retry
to create the file in a loop in such case.
Matthias Schwarzott [Tue, 20 Oct 2009 19:02:04 +0000 (04:02 +0900)]
rules: Gentoo update
Peter Rajnoha [Mon, 19 Oct 2009 21:55:42 +0000 (06:55 +0900)]
libudev: allow to store negative values in the udev database
Martin Pitt [Wed, 14 Oct 2009 22:13:17 +0000 (00:13 +0200)]
keymap: Add Logitech Wave cordless
https://launchpad.net/bugs/215035
Martin Pitt [Sun, 11 Oct 2009 18:02:11 +0000 (20:02 +0200)]
keymap: make USB keyboards really work
Calling usb_id and GOTO in one rule did not make sense at all.
Martin Pitt [Sun, 11 Oct 2009 16:18:43 +0000 (18:18 +0200)]
keymap: fix usb_id invocation
For deciding whether to call usb_id, test the property which we are actually
querying further down.
https://launchpad.net/215035
Martin Pitt [Thu, 8 Oct 2009 19:45:09 +0000 (21:45 +0200)]
keymap: add missing map file
This fixes commit
a05cd7ea3e582c9bf9680492e73687ea56cdd864
Martin Pitt [Thu, 8 Oct 2009 19:43:38 +0000 (21:43 +0200)]
keymap: Add Logitech Wave USB
This introduces a new rules section for USB keyboards, too.
https://launchpad.net/bugs/215035
Kay Sievers [Wed, 7 Oct 2009 22:06:23 +0000 (00:06 +0200)]
udevd: serialize events for with the same major/minor
On Wed, Oct 7, 2009 at 21:46, Alan Jenkins <sourcejedi.lkml@googlemail.com> wrote:
> Udev would have avoided the race prior to
>
>
82c785e "udevd: remove check for dev_t, DEVPATH_OLD takes care of that"
>
> (the "check" removed here used to serialize events based on the device
> major:minor number).
On Wed, Oct 7, 2009 at 22:31, Michael Guntsche <mike@it-loops.com> wrote:
> add /module/8250_pnp (module)
> remove /devices/platform/serial8250/tty/ttyS0 (tty)
> add /devices/pnp0/00:05/tty/ttyS0 (tty)
Maxim Levitsky [Fri, 25 Sep 2009 23:19:43 +0000 (02:19 +0300)]
keymap for Acer Aspire 5720
Martin Pitt [Mon, 5 Oct 2009 09:38:44 +0000 (11:38 +0200)]
50-udev-default.rules: fix printer MODE
Prefix with a 0 to be consistent with other rules.
https://launchpad.net/bugs/438114
Martin Pitt [Wed, 30 Sep 2009 09:10:24 +0000 (11:10 +0200)]
make raw USB printer devices world-readable again
Commit
f61e72d8 made raw USB printers accessible for the lp group. However,
chmoding them to 0660 is a bit over-zealous, since by default raw USB devices
are world-readable. Not being so breaks lsusb unnecessarily. Now set
permissions to 0664.
William Jon McCann [Sun, 27 Sep 2009 13:37:26 +0000 (06:37 -0700)]
udev-acl: catch up with ConsoleKit 0.4.1
Marco d'Itri [Thu, 24 Sep 2009 17:55:55 +0000 (10:55 -0700)]
gudev: gir-scanner workaround for out of tree builds
Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=562885
Andrew Church [Thu, 24 Sep 2009 17:51:12 +0000 (10:51 -0700)]
fix wrong parameter size on ioctl FIONREAD
On Wed, Sep 23, 2009 at 23:11, Matthias Schwarzott <zzam@gentoo.org> wrote:
> It is about ioctl failures on amd64:
> http://bugs.gentoo.org/show_bug.cgi?id=286041
>
> A bad parameter type to an ioctl() call causes udev-146 to generate "error
> getting buffer for inotify" messages in syslog. The offending code is
> roughly:
>
> ssize_t nbytes, pos;
> // ...
> ioctl(fd, FIONREAD, &nbytes);
>
> where ssize_t is 64 bits on amd64, but the kernel code for FIONREAD (at least
> through gentoo-sources-2.6.31) uses type int:
>
> p = (void __user *) arg;
> switch (cmd) {
> case FIONREAD:
> // ...
> ret = put_user(send_len, (int __user *) p);
>
> so the upper 32 bits of "nbytes" are left uninitialized, and the subsequent
> malloc(nbytes) fails unless those 32 bits happen to be zero (or the system has
> a LOT of memory).
Scott James Remnant [Tue, 22 Sep 2009 21:39:23 +0000 (14:39 -0700)]
util_run_program: *really* restore signal mask before executing event RUN commands
The previous patch was almost, but not quite, correct. Rather than
restoring the signal mask it actually tried to make an even more
restrictive signal mask (had SIGALRM been blocked when udevd started,
anyway).
Fix it harder.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Martin Pitt [Sun, 20 Sep 2009 17:21:04 +0000 (19:21 +0200)]
fix previous commit for CD detection
Do not run blkid twice. *brown paperbag*
Martin Pitt [Sun, 20 Sep 2009 17:07:51 +0000 (19:07 +0200)]
fix single-session CD detection
ID_CDROM_MEDIA_SESSION_LAST_OFFSET is not set for CDs with only a single
session (i. e. for the vast majority of CDs out there). The previous rules ran
blkid with invalid arguments for these, causing CD detection to fail in
DK-disks and gvfs.
Now check whether we actually have ID_CDROM_MEDIA_SESSION_LAST_OFFSET, and if
not, call blkid without -O for specifying the offset.
Many thanks to Maxim Levitsky for tracking this down!
https://launchpad.net/bugs/431055
Matthias Schwarzott [Sat, 19 Sep 2009 17:19:15 +0000 (19:19 +0200)]
rules: Gentoo update
Harald Hoyer [Fri, 18 Sep 2009 11:14:30 +0000 (13:14 +0200)]
rename interfaces to <iface>_rename if rename fails
Harald Hoyer [Wed, 16 Sep 2009 15:42:15 +0000 (17:42 +0200)]
scsi_id: prevent buffer overflow in check_fill_0x83_prespc3()
see https://bugzilla.redhat.com/show_bug.cgi?id=516920
Kay Sievers [Wed, 16 Sep 2009 18:27:30 +0000 (20:27 +0200)]
update TODO, NEWS
Kay Sievers [Wed, 16 Sep 2009 18:08:50 +0000 (20:08 +0200)]
rules: drop almost all NAME= keys
The drivers in kernel 2.6.31 supply the names for custom node names if
needed.
Kay Sievers [Wed, 16 Sep 2009 17:41:09 +0000 (19:41 +0200)]
rules: remove remaining NAME="%k"
Kay Sievers [Wed, 16 Sep 2009 16:14:03 +0000 (18:14 +0200)]
fix SYMLINK{} option parsing
Kay Sievers [Mon, 14 Sep 2009 12:33:26 +0000 (14:33 +0200)]
scsi_id: delete copy of bsg.h
It's provided by the kernel since 2.6.23.
Kay Sievers [Mon, 14 Sep 2009 12:29:05 +0000 (14:29 +0200)]
udevadm: control - remove compat code
Marco d'Itri [Mon, 14 Sep 2009 12:05:31 +0000 (14:05 +0200)]
udevadmi: control = exit with rc=2 if there is some system error
Marco d'Itri [Mon, 14 Sep 2009 11:56:38 +0000 (13:56 +0200)]
udevadm: print all messages to stderr with priority higher or equal than LOG_ERR
It is needed to prevent errors in udev from going unnoticed (e.g.
when udevd is not running).
Kay Sievers [Thu, 10 Sep 2009 00:08:05 +0000 (02:08 +0200)]
put util_create_path() and file creastion in a retry loop
On 8/29/09, Florian Zumbiehl <florz@florz.de> wrote:
> Could it happen that > util_create_path() and util_delete_path()
> do run in parallel for > the same directory? After all, util_create_path()
> does handle > the case where creation of the directory happens in parallel
> to it running, so it doesn't seem all that unlikely to me ...
Kay Sievers [Wed, 9 Sep 2009 23:35:48 +0000 (01:35 +0200)]
reorder create_path() and node/link creation to be called in a direct sequence
Lennart Poettering [Wed, 9 Sep 2009 21:11:40 +0000 (23:11 +0200)]
sound: recognize saa7134 TV card sound devices as TV cards
Kay Sievers [Wed, 9 Sep 2009 16:18:17 +0000 (18:18 +0200)]
simplify "symlink name stack"
With well defined and kernel-supplied node names, we no longer need
to support a possible stack of conflicting symlinks and node names.
Only symlinks with identical names can be claimed by multiple devices.
This shrinks the former /dev/.udev/names/ significantly.
Also the /dev/{block,char}/MAJ:MIN" links are excluded from the name
stack - they are unique and can not conflict.
Martin Pitt [Wed, 9 Sep 2009 13:22:48 +0000 (15:22 +0200)]
extras/keymap: Rename KEY_COFFEE to KEY_SCREENLOCK
Unfortunately KEY_COFFEE is the canonical name in linux/input.h, and the more
sensible KEY_SCREENLOCK is an alias. Manually override this particular case,
since it's better to have "screenlock" in keymaps.
However, we still keep the automatic filtering for the general case, to avoid
introducing this problem again when input.h changes.
Martin Pitt [Wed, 9 Sep 2009 09:09:17 +0000 (11:09 +0200)]
extras/keymap: fix hash table collisions
More than one key name was mapped to the same key, due to linux/input.h
defining some aliases (in particular, KEY_HANGUEL, KEY_SCREENLOCK,
KEY_MIN_INTERESTING). These caused hash table collisions.
Changed the generation of the tables to ignore these aliases, and updated all
keymaps to use the canonical name.
This was detected by llvm-clang-analyzer. Thanks to Lennart Poettering for
doing these checks and pointing this out!
https://launchpad.net/bugs/426647
Kay Sievers [Tue, 8 Sep 2009 20:11:04 +0000 (22:11 +0200)]
fix randonm findings from llvm-clang-analyzer
Thanks to Lennart for the log file!
Florian Zumbiehl [Tue, 8 Sep 2009 19:42:21 +0000 (21:42 +0200)]
util_run_program(): fix possible buffer overflow #2
I'm not sure how likely it is for UTIL_PATH_SIZE to have an odd value
(maybe it has right now? :-), but I guess making this universally correct
doesn't hurt ...
Kay Sievers [Tue, 8 Sep 2009 12:57:42 +0000 (14:57 +0200)]
require 2.6.27 for proper signalfd handling
<zzam> kay: ping I found out why udev-145 fails on some
systems with kernel 2.6.25 and 2.6.26
<zzam> kay: it is because glibc was compiled against linux-headers-2.6.27
or newer and issues signalfd4 syscall which was introduced in
kernel 2.6.27 and not older signalfd syscall
Martin Pitt [Mon, 7 Sep 2009 17:37:43 +0000 (19:37 +0200)]
modem-modeswitch rules: Match more devices
extras/modem-modeswitch/61-mobile-action.rules: Match on device class/subclass
"00" as well, some devices like the Vodafone K3565-Z have that.
https://launchpad.net/bugs/281335
Kay Sievers [Mon, 7 Sep 2009 10:15:29 +0000 (12:15 +0200)]
fix whitespace
Kay Sievers [Mon, 7 Sep 2009 10:12:55 +0000 (12:12 +0200)]
util_run_program(): skip multiple spaces in argv creation
Jeremy Kerr [Sat, 5 Sep 2009 07:48:23 +0000 (17:48 +1000)]
util_run_program: restore signal mask before executing event RUN commands
External programs triggered by events (via RUN=) will inherit udev's
signal mask, which is set to block all but SIGALRM. For most utilities,
this is OK, but if we start daemons from RUN=, we run into trouble
(especially as SIGCHLD is blocked).
This change saves the original sigmask when udev starts, and restores it
just before we exec() the external command.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>