summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-05-25 09:54:14 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-05-25 09:54:14 +0200
commit484e1b2d11b9b89418589d885a625e647881933b (patch)
tree358039928d5e950f6d2c6a163fae9a522e586561 /rules
parent898e5d4ca5f8b1a7b56bcaf4710656ba798f2264 (diff)
rules: optical drives - use ID_CDROM_MEDIA_TRACK_COUNT_DATA
We should not access non-data optical media, ans skip things like blkid. It will cause errors for some drives. https://bugzilla.kernel.org/show_bug.cgi?id=15757
Diffstat (limited to 'rules')
-rw-r--r--rules/rules.d/60-persistent-storage.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index d9f8003cde..1f46041283 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -52,9 +52,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
# probe filesystem metadata of optical drives which have a media inserted
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"