chiark / gitweb /
12 years agolibudev: device - create db file atomically
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.

12 years agodo not remove device nodes of active kernel devices
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.

12 years agoudevd: inotify - do not parse rules at create but at close
Kay Sievers [Wed, 13 Jan 2010 12:09:02 +0000 (13:09 +0100)]
udevd: inotify - do not parse rules at create but at close

We do not need to get notified about created files, only about moved
ones or files closed-after-writing.

12 years version bump
Kay Sievers [Wed, 13 Jan 2010 11:59:37 +0000 (12:59 +0100)] version bump

12 years agowriting_udev_rules: update rules files names
Marco d'Itri [Mon, 11 Jan 2010 10:55:50 +0000 (11:55 +0100)]
writing_udev_rules: update rules files names

12 years agoFix reverted floppy-device permissions
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.

Commit 78171d9549fafdfc1e29d30915104a3ad55e116b reverted this, when it
moved the call to create_floppy_devices out to another rules file, for

Presumably the 0660 mode was correct, and the 0640 reversion was not
intentional; this restores 0660.

Signed-off-by: Bryan Kadzban <>
12 years agorelease 150
Kay Sievers [Thu, 7 Jan 2010 16:21:26 +0000 (17:21 +0100)]
release 150

12 years agogobject-introspection: use $datadir instead of $prefix
Kay Sievers [Thu, 7 Jan 2010 16:16:23 +0000 (17:16 +0100)]
gobject-introspection: use $datadir instead of $prefix

12 years agowork around gtk-doc which breaks distcheck
Kay Sievers [Thu, 7 Jan 2010 16:11:06 +0000 (17:11 +0100)]
work around gtk-doc which breaks distcheck

12 years agolibudev: doc - add symbols to sections.txt
Kay Sievers [Thu, 7 Jan 2010 15:42:23 +0000 (16:42 +0100)]
libudev: doc - add symbols to sections.txt

12 years agorules: udev-acl - add firewire video devices
Marco d'Itri [Thu, 7 Jan 2010 15:17:22 +0000 (16:17 +0100)]
rules: udev-acl - add firewire video devices

12 years agobuild: keymap - create subdir
Marco d'Itri [Thu, 7 Jan 2010 15:16:00 +0000 (16:16 +0100)]
build: keymap - create subdir

12 years agokeymap: Samsung R70/R71 force-release quirk
Clemens Buchacher [Tue, 5 Jan 2010 15:55:18 +0000 (16:55 +0100)]
keymap: Samsung R70/R71 force-release quirk

Signed-off-by: Martin Pitt <>
12 years agokeymap: Document force-release
Martin Pitt [Tue, 5 Jan 2010 08:52:30 +0000 (09:52 +0100)]
keymap: Document force-release

Make a note in README.keymap.txt about stuck keys which need a force-release

12 years agokeymap: Add Fujitsu Amilo Li 1718
Martin Pitt [Tue, 5 Jan 2010 08:39:53 +0000 (09:39 +0100)]
keymap: Add Fujitsu Amilo Li 1718

12 years agokeymap: Lenovo Thinkpad USB Keyboard with Tracepoint
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

    - 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 <>
Signed-off-by: Martin Pitt <>
12 years agolibudev: enumerate - fix move_later logic
Thomas de Grenier de Latour [Wed, 30 Dec 2009 15:21:59 +0000 (16:21 +0100)]
libudev: enumerate - fix move_later logic

The move_later_prefix variable was reset to zero on each
loop iteration, and thus the move_later entry (if any) was
not added right after changing to another syspath prefix,
but rather after exiting the enumeration loop.

12 years agokeymap: Add LG X110
Martin Pitt [Sun, 27 Dec 2009 10:42:21 +0000 (11:42 +0100)]
keymap: Add LG X110

This is an MSI Wind clone.

Reported on hal ML by Ozan Çağlayan <>

12 years agokeymap: Fix typo in compal rules
Daniel Drake [Thu, 24 Dec 2009 12:46:09 +0000 (12:46 +0000)]
keymap: Fix typo in compal rules

Signed-off-by: Martin Pitt <>
12 years agokeymap: Add OLPC XO key mappings
Daniel Drake [Thu, 24 Dec 2009 12:43:46 +0000 (12:43 +0000)]
keymap: Add OLPC XO key mappings

This supports both XO-1 and XO-1.5.

Signed-off-by: Martin Pitt <>
12 years agokeymap: Add Acer Aspire 1810TZ
Martin Pitt [Sun, 27 Dec 2009 10:30:53 +0000 (11:30 +0100)]
keymap: Add Acer Aspire 1810TZ

12 years agokeymap: add Acer TravelMate 8471
Martin Pitt [Sat, 26 Dec 2009 10:16:33 +0000 (11:16 +0100)]
keymap: add Acer TravelMate 8471

12 years agoudevadm: logging - copy va_list and do not use it twice
Kay Sievers [Fri, 25 Dec 2009 15:14:22 +0000 (16:14 +0100)]
udevadm: logging - copy va_list and do not use it twice

12 years agoremove UDEV_RUN environment variable
Kay Sievers [Fri, 25 Dec 2009 14:23:45 +0000 (15:23 +0100)]
remove UDEV_RUN environment variable

It handles only RUN but not IMPORT and PROGRAM. There is no sane way
to suppress program execution. Most important programs run with IMPORT
these days. Also events can no longer suppressed with the libudev
netlink messages, so UDEV_RUN does nothing useful and is just

12 years agofix typo in log message priority handling
Kay Sievers [Fri, 25 Dec 2009 13:47:59 +0000 (14:47 +0100)]
fix typo in log message priority handling

12 years agoremove remaining support for CONFIG_SYSFS_DEPRECATED
Kay Sievers [Thu, 24 Dec 2009 21:10:40 +0000 (22:10 +0100)]
remove remaining support for CONFIG_SYSFS_DEPRECATED

12 years agoudevadm: info - fix info --root --query=name --path= for device without a device...
Kay Sievers [Thu, 24 Dec 2009 19:42:02 +0000 (20:42 +0100)]
udevadm: info - fix info --root --query=name --path= for device without a device node

Subject: Bug#561279: udev: Crash location and first-level cause
Reply-To: Stephen Kitt <>,

12 years agokeymap: Add Logitech S510 USB keyboard
Martin Pitt [Wed, 23 Dec 2009 09:38:20 +0000 (10:38 +0100)]
keymap: Add Logitech S510 USB keyboard

The Logitech S510 identifies just like the already existing
"logitech-wave-cordless" variant, but with wildly different scancodes. So just
merge the tables, since they won't collide.

12 years agoClarify RUN/IMPORT documentation
Martin Pitt [Tue, 22 Dec 2009 12:08:23 +0000 (13:08 +0100)]
Clarify RUN/IMPORT documentation

Explain command/argument separation rules, search path, and quoting for RUN and

12 years agokeymap: Add hotkey quirk for Acer Aspire One (AO531h/AO751h)
Martin Pitt [Tue, 22 Dec 2009 11:48:50 +0000 (12:48 +0100)]
keymap: Add hotkey quirk for Acer Aspire One (AO531h/AO751h)

From hal-info ML, thanks to Keng-Yü Lin!

12 years agoSpeed up udev_enumerate_scan_*
Martin Pitt [Mon, 21 Dec 2009 14:41:25 +0000 (15:41 +0100)]
Speed up udev_enumerate_scan_*

Check property match earlier, to avoid lots of readlink() and stat()
calls when we check property matches.

12 years agoadd Samsung R70/R71 keymap
Clemens Buchacher [Mon, 21 Dec 2009 08:24:34 +0000 (09:24 +0100)]
add Samsung R70/R71 keymap

Required for the keyboard driver to recognize special keys such as Fn+F2
(battery), Fn+F3 (euro), Fn+F4 (switchmode), Fn+F6 (mute), Fn+F7
(XF86Launch2), Fn+up/down (brightness), Fn+left/right (volume). Fn+F5 (blank
screen) and Fn+F8 still do not generate events after this change, howver.

Signed-off-by: Clemens Buchacher <>
Signed-off-by: Martin Pitt <>
12 years agoupdate mtime of nodes and links when we re-use them
Kay Sievers [Fri, 18 Dec 2009 20:25:13 +0000 (21:25 +0100)]
update mtime of nodes and links when we re-use them

12 years agofirmware: convert shell script to C
Piter PUNK [Tue, 15 Dec 2009 15:28:52 +0000 (16:28 +0100)]
firmware: convert shell script to C

12 years agorules: add "block" match to floppy rule
Kay Sievers [Tue, 15 Dec 2009 15:17:12 +0000 (16:17 +0100)]
rules: add "block" match to floppy rule

12 years agocdrom_id: remove deprecated device matches
Kay Sievers [Tue, 15 Dec 2009 15:15:33 +0000 (16:15 +0100)]
cdrom_id: remove deprecated device matches

12 years agoremove remaining support for CONFIG_SYSFS_DEPRECATED
Kay Sievers [Tue, 15 Dec 2009 15:14:14 +0000 (16:14 +0100)]
remove remaining support for CONFIG_SYSFS_DEPRECATED

12 years version bump
Kay Sievers [Tue, 15 Dec 2009 14:53:21 +0000 (15:53 +0100)] version bump

12 years agofloppy: fix rule to create additional floppy device nodes
Kay Sievers [Tue, 15 Dec 2009 14:07:25 +0000 (15:07 +0100)]
floppy: fix rule to create additional floppy device nodes

12 years agolibudev: wrap in extern "C" block for C++
Daniel Elstner [Mon, 14 Dec 2009 20:15:20 +0000 (21:15 +0100)]
libudev: wrap in extern "C" block for C++

When libudev.h is included from C++ code, wrap the declarations in an
extern "C" { ... } block.  This tells the C++ compiler that symbols
are exported with C linkage and no name-mangling.

12 years agokeymap: fix findkeyboards
Martin Pitt [Tue, 15 Dec 2009 10:49:12 +0000 (11:49 +0100)]
keymap: fix findkeyboards

Update findkeyboards for the recent ID_CLASS deprecation, use ID_INPUT_KEYBOARD
instead. This simplifies the logic a bit, too.

12 years agokeymap: handle atkbd force_release quirk
Johannes Stezenbach [Sun, 13 Dec 2009 22:54:05 +0000 (23:54 +0100)]
keymap: handle atkbd force_release quirk

Some laptop keyboards don't generate release events
for some hotkeys.  Since linux-2.6.32 the list of scancodes
for which to enable the force_release quirk can be set
via sysfs.
Apply this to Samsung N130.

Signed-off-by: Johannes Stezenbach <>
Signed-off-by: Martin Pitt <>
12 years ago95-keymap.rules: Run on change events, too
Martin Pitt [Mon, 14 Dec 2009 13:31:51 +0000 (14:31 +0100)]
95-keymap.rules: Run on change events, too

12 years agokeymap: add Samsung N130
Johannes Stezenbach [Mon, 14 Dec 2009 00:14:03 +0000 (01:14 +0100)]
keymap: add Samsung N130

Signed-off-by: Johannes Stezenbach <>
Signed-off-by: Martin Pitt <>
12 years ago70-acl.rules: ACL manage Android G1 dev phones
Scott James Remnant [Thu, 10 Dec 2009 20:01:05 +0000 (20:01 +0000)]
70-acl.rules: ACL manage Android G1 dev phones

There doesn't seem to be any special class for their developer
interface, so match by Vendor and Device id like we do for things
like fingerprint readers.

This is better than their current 0666 suggestion <g>

Signed-off-by: Scott James Remnant <>
12 years agokeymap: Add Acer Aspire 1810T
Martin Pitt [Thu, 10 Dec 2009 08:22:33 +0000 (09:22 +0100)]
keymap: Add Acer Aspire 1810T

12 years agoutil_unlink_secure(): chmod() before chown()
Kay Sievers [Tue, 8 Dec 2009 17:44:45 +0000 (18:44 +0100)]
util_unlink_secure(): chmod() before chown()

David Zeuthen [Fri, 4 Dec 2009 16:25:09 +0000 (11:25 -0500)]

Some SCSI devices use the same WWN and have a WWN extension that we
need to take into account when creating the /dev/disk/by-id/wwn
symlinks. Thus, introduce ID_WWN_WITH_EXTENSION. This property will
contain either the WWN (if no extension is present) or the WWN with
the vendor extension appended.


 # /lib/udev/ata_id/ata_id --export /dev/sda |grep WWN

 # /lib/udev/scsi_id --whitelisted --export -d /dev/sdb |grep WWN

 # /lib/udev/scsi_id --whitelisted --export -d /dev/sdc |grep WWN

Signed-off-by: David Zeuthen <>
12 years agorelease 149
Kay Sievers [Thu, 3 Dec 2009 13:39:12 +0000 (14:39 +0100)]
release 149

12 years agofix both in-tree and out-of-tree builds
Kay Sievers [Thu, 3 Dec 2009 13:36:36 +0000 (14:36 +0100)]
fix both in-tree and out-of-tree builds

On Thu, Dec 3, 2009 at 14:31, Daniel Elstner <> wrote:
> However, I'd recommend to look first in the build directory, and then in
> the source directory to match the behavior of make with VPATH builds.
> The idea is that a file in the build tree, if it exists, overrides a
> file of the same name in the source tree.

12 years agoreally really fix both in-tree and out-of-tree builds
Kay Sievers [Thu, 3 Dec 2009 12:58:18 +0000 (13:58 +0100)]
really really fix both in-tree and out-of-tree builds

The include is still missing:
  GEN    extras/gudev/GUdev-1.0.gir
  In file included from <stdin>:4:
  /home/kay/work/src/udev/extras/gudev/gudev.h:26:34: error: gudev/gudevenumtypes.h: No such file or directory

Also prepend $(builddir).

12 years agoreally fix both in-tree and out-of-tree builds
Daniel Elstner [Wed, 2 Dec 2009 20:39:50 +0000 (22:39 +0200)]
really fix both in-tree and out-of-tree builds (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.

12 years version bump
Kay Sievers [Thu, 3 Dec 2009 12:31:43 +0000 (13:31 +0100)] version bump

12 years agolibudev: doc - use #NULL
Kay Sievers [Thu, 3 Dec 2009 12:31:27 +0000 (13:31 +0100)]
libudev: doc - use #NULL

12 years agoudev_device_get_parent_with_subsystem_devtype(): Clarify documentation
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.

12 years agoinput-id: identify touchscreens
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 <>
12 years agoinput_id: Check mouse button for ID_INPUT_MOUSE
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

Thanks to Dmitry Torokhov <> for pointing out!

12 years agoinput_id: check event mask
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!

12 years agoinput_id: small optimization
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

12 years agoinput_id: Do not tag non-input devices with ID_INPUT
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.

12 years agoinput_id: Fix endless loop for non-input devices
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.

12 years agorelease 148
Kay Sievers [Wed, 2 Dec 2009 11:58:47 +0000 (12:58 +0100)]
release 148

12 years agoRevert "Fix out-of-tree builds"
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:;a=commit;h=7fa9bb9dbf538bf3c8a25a6699f65a8ac9cc8bbf
still exists. We need to find a reliable way not to break
"make distcheck" here.

12 years agoinput_id: code cleanup
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

12 years agoFix out-of-tree builds
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 <>
12 years agoextras/input_id: Correctly identify touchpads
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.

12 years agoinput: Deprecate ENV{ID_CLASS}
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

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.

12 years ago70-acl.rules: Use new-style input properties
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.

12 years agoextras: Add input_id
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 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.

12 years agoAlso create /dev/disk/by-id/wwn-0x..-part%n symlinks for partitions
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 <>
12 years agoCreate /dev/disk/by-id/wwn-0x... symlinks
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 <>
12 years agoFix typo in NEWS, ConsoleKit-0.4.11 -> 0.4.1
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 <>
12 years agomodem-modeswitch: 61-option-modem-modeswitch.rules is only for Option NV devices
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

12 years agoRevert "extras/modem-modeswitch: Add Huawei E1550 GSM modem"
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.

12 years agoRevert "modem-modeswitch: add a device"
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.

12 years agoscsi_id: Export WWN and Unit Serial Number
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

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:


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

 2. It would break existing setups if the value of ID_SERIAL changed

Signed-off-by: David Zeuthen <>
12 years agoREADME.keymap.txt: small clarification
Martin Pitt [Sat, 21 Nov 2009 00:22:53 +0000 (18:22 -0600)]
README.keymap.txt: small clarification

12 years agoata_id: skip ATA commands if we find an optical drive
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 <> for his debugging.

Original bug is here:

12 years agorules: remove support for IDE (hd*) devices
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:

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.

12 years catch-up with recent changes
Kay Sievers [Mon, 16 Nov 2009 22:48:58 +0000 (23:48 +0100)] catch-up with recent changes

12 years agotest-udev: remove "ignore_device" code
Kay Sievers [Mon, 16 Nov 2009 22:40:27 +0000 (23:40 +0100)]
test-udev: remove "ignore_device" code

12 years agoprint warning for BUS=, SYSFS{}=, ID=
Kay Sievers [Mon, 16 Nov 2009 22:39:33 +0000 (23:39 +0100)]
print warning for BUS=, SYSFS{}=, ID=

12 years agoremove "ignore_device"
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.

12 years agomodem-modeswitch: add a device
Harald Hoyer [Thu, 12 Nov 2009 21:17:47 +0000 (22:17 +0100)]
modem-modeswitch: add a device

12 years agorules: set mode of floppy device nodes to 0660
Kay Sievers [Thu, 12 Nov 2009 20:52:51 +0000 (21:52 +0100)]
rules: set mode of floppy device nodes to 0660

12 years agocdrom_id: Still check profiles even if there is no media
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

for more information.

Signed-off-by: David Zeuthen <>
12 years agorelease 147
Kay Sievers [Tue, 10 Nov 2009 14:35:11 +0000 (15:35 +0100)]
release 147

12 years agoRevert "gudev: fix out-of-tree build"
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.

12 years agoupdate NEWS
Kay Sievers [Tue, 10 Nov 2009 05:49:02 +0000 (06:49 +0100)]
update NEWS

12 years agogudev: fix out-of-tree build
Marco d'Itri [Tue, 10 Nov 2009 05:35:20 +0000 (06:35 +0100)]
gudev: fix out-of-tree build

12 years agogudev: fix pkg-config call to work with "make distcheck"
Kay Sievers [Tue, 10 Nov 2009 05:31:13 +0000 (06:31 +0100)]
gudev: fix pkg-config call to work with "make distcheck"

12 years agoRevert "sound: include ALSA sound card id in /dev/snd/by-id/ links"
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.

12 years agogudev: Remove LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE from priv header
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 <>
12 years agosound: include ALSA sound card id in /dev/snd/by-id/ links
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.

12 years agogudev: Fix up GUdevDeviceNumber
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

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 <>
12 years agomodem-modeswitch: fix ZTE MF6xx rule
Martin Pitt [Thu, 5 Nov 2009 22:56:28 +0000 (23:56 +0100)]
modem-modeswitch: fix ZTE MF6xx rule

12 years agosound: include ALSA sound card id in ID_ID property
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:

12 years agoudevd: create /dev/.udev/rules.d/ before watching it wit inotify
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 <> 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.

12 years agoata_id: export more advanced ATA features
David Zeuthen [Wed, 4 Nov 2009 15:34:22 +0000 (16:34 +0100)]
ata_id: export more advanced ATA features

12 years agofix major fd leak in link handling
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.