[udev/f14/master] - add cdrom_id patch for pre-MMC2 drives, which do not report profiles Resolves: rhbz#637495
Harald Hoyer
harald at fedoraproject.org
Tue Oct 5 15:10:46 UTC 2010
commit e61860db45eea7822f57aede87a80fa20e0e1ff5
Author: Harald Hoyer <harald at redhat.com>
Date: Tue Oct 5 17:11:39 2010 +0200
- add cdrom_id patch for pre-MMC2 drives, which do not report
profiles
Resolves: rhbz#637495
udev-161-cdrom-fallback.patch | 20 ++++++++++++++++++++
udev.spec | 11 ++++++++++-
2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/udev-161-cdrom-fallback.patch b/udev-161-cdrom-fallback.patch
new file mode 100644
index 0000000..bedb39b
--- /dev/null
+++ b/udev-161-cdrom-fallback.patch
@@ -0,0 +1,20 @@
+diff -urN udev-161/extras/cdrom_id/cdrom_id.c udev-161.new/extras/cdrom_id/cdrom_id.c
+--- udev-161/extras/cdrom_id/cdrom_id.c 2010-10-05 16:59:22.000000000 +0200
++++ udev-161.new/extras/cdrom_id/cdrom_id.c 2010-10-05 16:59:06.000000000 +0200
+@@ -364,8 +364,14 @@
+ err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
+- info(udev, "no current profile, assuming no media\n");
+- return -1;
++ if (cd_media == 1) {
++ info(udev, "no current profile, but disc is present; assuming CD-ROM\n");
++ cd_media_cd_rom = 1;
++ return 0;
++ } else {
++ info(udev, "no current profile, assuming no media\n");
++ return -1;
++ }
+ };
+
+ cd_media = 1;
diff --git a/udev.spec b/udev.spec
index 6fc041f..ade4df7 100644
--- a/udev.spec
+++ b/udev.spec
@@ -7,7 +7,7 @@
Summary: A rule-based device node and kernel event manager
Name: udev
Version: 161
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Base
Provides: udev-persistent = %{version}-%{release}
@@ -40,6 +40,8 @@ Patch21: 0021-cdrom_id-Fix-DVD-blank-detection-for-sloppy-firmware.patch
Patch22: 0022-set-SELinux-context-on-add-but-not-on-change-events.patch
Patch23: 0023-do-not-create-persistent-name-rules-for-KVM-network-.patch
+Patch100: udev-161-cdrom-fallback.patch
+
ExclusiveOS: Linux
URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -159,6 +161,8 @@ glib-based applications using libudev functionality.
%patch22 -p1 -b .git22
%patch23 -p1 -b .git23
+%patch100 -p1
+
%build
libtoolize -f -c
%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \
@@ -394,6 +398,11 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0*
%changelog
+* Tue Oct 05 2010 Harald Hoyer <harald at redhat.com> 161-2
+- add cdrom_id patch for pre-MMC2 drives, which do not report
+ profiles
+Resolves: rhbz#637495
+
* Wed Sep 01 2010 Harald Hoyer <harald at redhat.com> 161-2
- bugfixes for systemd service files
- bugfix for selinux labeling
More information about the scm-commits
mailing list