rpms/udev/F-11 udev.git-f907449eee.patch,NONE,1.1
Harald Hoyer
harald at fedoraproject.org
Fri Apr 24 10:39:08 UTC 2009
Author: harald
Update of /cvs/pkgs/rpms/udev/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20554
Added Files:
udev.git-f907449eee.patch
Log Message:
* Fri Apr 24 2009 Harald Hoyer <harald at redhat.com> 141-3
- cdrom_id: add and use ID_CDROM_MEDIA to decide if we run vol_id
(bug #496298)
- Resolves: rhbz#496298
udev.git-f907449eee.patch:
--- NEW FILE udev.git-f907449eee.patch ---
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Tue, 21 Apr 2009 01:27:14 +0000 (+0200)
Subject: cdrom_id: add and use ID_CDROM_MEDIA to decide if we run vol_id
X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f907449eee
cdrom_id: add and use ID_CDROM_MEDIA to decide if we run vol_id
Some broken mobile phones offer a faked cdrom drive with a media
without any tracks.
---
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index c578f12..371d6a2 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -76,6 +76,7 @@ static unsigned int cd_mrw;
static unsigned int cd_mrw_w;
/* media info */
+static unsigned int cd_media;
static unsigned int cd_media_cd_rom;
static unsigned int cd_media_cd_r;
static unsigned int cd_media_cd_rw;
@@ -325,6 +326,8 @@ static int cd_profiles(struct udev *udev, int fd)
return -1;
}
+ cd_media = 1;
+
switch (cur_profile) {
case 0x03:
case 0x04:
@@ -625,6 +628,8 @@ print:
if (cd_mrw_w)
printf("ID_CDROM_MRW_W=1\n");
+ if (cd_media)
+ printf("ID_CDROM_MEDIA=1\n");
if (cd_media_mo)
printf("ID_CDROM_MEDIA_MO=1\n");
if (cd_media_mrw)
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index 23c21f8..4095488 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -55,7 +55,7 @@ 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_TRACK_COUNT}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", IMPORT{program}="vol_id --export --skip-raid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"
More information about the fedora-extras-commits
mailing list