From: David Zeuthen Date: Thu, 18 Jun 2009 17:16:57 +0000 (-0400) Subject: Use ID_CDROM_MEDIA to detect optical drives X-Git-Tag: upstream/2.1.2~835 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97d71294bdb15eda4ff6624b80601cd847953e46;p=platform%2Fupstream%2Fudisks2.git Use ID_CDROM_MEDIA to detect optical drives This is available since udev 142 that we already depend on. This change makes my USB stick from Sandisk "work" as "expected": http://people.freedesktop.org/~david/thanks-sandisk.png --- diff --git a/src/95-devkit-disks.rules b/src/95-devkit-disks.rules index e339942..7058897 100644 --- a/src/95-devkit-disks.rules +++ b/src/95-devkit-disks.rules @@ -16,7 +16,7 @@ KERNEL=="hd*[!0-9]", ATTR{removable}=="1", SUBSYSTEMS=="ide", ATTRS{media}=="dis KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="probe_parttable_end" # don't scan for partition tables on empty discs -KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT}!="?*", GOTO="probe_parttable_end" +KERNEL=="sr*", ENV{ID_CDROM_MEDIA}!="?*", GOTO="probe_parttable_end" # scan for partition tables both on whole-disk and partitions #