[hplip/f15: 2/2] Release parport if unsupported model connected (bug #699052).
Tim Waugh
twaugh at fedoraproject.org
Wed Mar 21 17:32:10 UTC 2012
commit d9f4b52d9a752c11e22ff5cb6a8a1a33a6cf0c6f
Author: Tim Waugh <twaugh at redhat.com>
Date: Wed Mar 21 16:36:22 2012 +0000
Release parport if unsupported model connected (bug #699052).
hplip-release-parport.patch | 12 ++++++++++++
hplip.spec | 9 ++++++++-
2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/hplip-release-parport.patch b/hplip-release-parport.patch
new file mode 100644
index 0000000..8cb36cc
--- /dev/null
+++ b/hplip-release-parport.patch
@@ -0,0 +1,12 @@
+diff -up hplip-3.12.2/io/hpmud/pp.c.release-parport hplip-3.12.2/io/hpmud/pp.c
+--- hplip-3.12.2/io/hpmud/pp.c.release-parport 2012-02-01 11:53:52.000000000 +0000
++++ hplip-3.12.2/io/hpmud/pp.c 2012-03-21 16:43:31.876908024 +0000
+@@ -1240,6 +1240,8 @@ int __attribute__ ((visibility ("hidden"
+ if (ma.support != HPMUD_SUPPORT_TYPE_HPLIP)
+ {
+ BUG("ignoring %s support=%d\n", dev, ma.support);
++ release_pp(fd);
++ close(fd);
+ continue; /* ignor, not supported */
+ }
+
diff --git a/hplip.spec b/hplip.spec
index 62130e8..7a770ac 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,7 +1,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.12.2
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+ and MIT
Group: System Environment/Daemons
Conflicts: system-config-printer < 0.6.132
@@ -33,6 +33,7 @@ Patch16: hplip-bad-low-ink-warning.patch
Patch17: hplip-deviceIDs-ppd.patch
Patch18: hplip-skip-blank-lines.patch
Patch19: hplip-dbglog-newline.patch
+Patch20: hplip-release-parport.patch
Patch21: hplip-ppd-ImageableArea.patch
Patch22: hplip-raw_deviceID-traceback.patch
Patch23: hplip-UnicodeDecodeError.patch
@@ -249,6 +250,9 @@ done
# Added missing newline to string argument in dbglog() call (bug #585275).
%patch19 -p1 -b .dbglog-newline
+# Release parport if unsupported model connected (bug #699052).
+%patch20 -p1 -b .release-parport
+
# Fix ImageableArea for Laserjet 8150/9000 (bug #596298).
for ppd_file in $(grep '^diff' %{PATCH21} | cut -d " " -f 4);
do
@@ -515,6 +519,9 @@ fi
%postun libs -p /sbin/ldconfig
%changelog
+* Wed Mar 21 2012 Tim Waugh <twaugh at redhat.com> 3.12.2-4
+- Release parport if unsupported model connected (bug #699052).
+
* Wed Feb 29 2012 Tim Waugh <twaugh at redhat.com> 3.12.2-3
- Added another IEEE 1284 Device ID for Color LaserJet CP2025dn to
cope with its DNS-SD response, which has no usb_* keys (bug #651509).
More information about the scm-commits
mailing list