Use ID_CDROM_MEDIA to detect optical drives
authorDavid Zeuthen <davidz@redhat.com>
Thu, 18 Jun 2009 17:16:57 +0000 (13:16 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Thu, 18 Jun 2009 17:16:57 +0000 (13:16 -0400)
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

src/95-devkit-disks.rules

index e339942..7058897 100644 (file)
@@ -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
 #