[libmtp] Fix for canon scanners
Linus Walleij
snirkel at fedoraproject.org
Sat Jan 28 10:01:43 UTC 2012
commit 491c40ea8e46192b7fad9af72ac85bf89ace52e1
Author: Linus Walleij <triad at df.lth.se>
Date: Sat Jan 28 11:01:34 2012 +0100
Fix for canon scanners
0001-Skip-probe-on-Canon-0x22-products.patch | 42 ++++++++++++++++++++++++++
libmtp.spec | 7 ++++-
2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/0001-Skip-probe-on-Canon-0x22-products.patch b/0001-Skip-probe-on-Canon-0x22-products.patch
new file mode 100644
index 0000000..185e12f
--- /dev/null
+++ b/0001-Skip-probe-on-Canon-0x22-products.patch
@@ -0,0 +1,42 @@
+From 1ff1a64acc1f789e85029d41c71903d119b5c8bb Mon Sep 17 00:00:00 2001
+From: Linus Walleij <triad at df.lth.se>
+Date: Sat, 28 Jan 2012 10:54:37 +0100
+Subject: [PATCH] Skip probe on Canon 0x22* products
+
+Signed-off-by: Linus Walleij <triad at df.lth.se>
+---
+ util/mtp-hotplug.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/util/mtp-hotplug.c b/util/mtp-hotplug.c
+index 3709385..959b034 100644
+--- a/util/mtp-hotplug.c
++++ b/util/mtp-hotplug.c
+@@ -2,7 +2,7 @@
+ * \file mtp-hotplug.c
+ * Program to create hotplug scripts.
+ *
+- * Copyright (C) 2005-2011 Linus Walleij <triad at df.lth.se>
++ * Copyright (C) 2005-2012 Linus Walleij <triad at df.lth.se>
+ * Copyright (C) 2006-2008 Marcus Meissner <marcus at jet.franken.de>
+ *
+ * This library is free software; you can redistribute it and/or
+@@ -140,11 +140,14 @@ int main (int argc, char **argv)
+ printf("SUBSYSTEM==\"usb\", GOTO=\"libmtp_usb_rules\"\n"
+ "GOTO=\"libmtp_rules_end\"\n\n"
+ "LABEL=\"libmtp_usb_rules\"\n\n");
+- printf("# Some sensitive devices we surely don\'t wanna probe, color instruments\n");
++ printf("# Some sensitive devices we surely don\'t wanna probe\n");
++ printf("# Color instruments\n");
+ printf("ATTR{idVendor}==\"0670\", GOTO=\"libmtp_rules_end\"\n");
+ printf("ATTR{idVendor}==\"0765\", GOTO=\"libmtp_rules_end\"\n");
+ printf("ATTR{idVendor}==\"085c\", GOTO=\"libmtp_rules_end\"\n");
+ printf("ATTR{idVendor}==\"0971\", GOTO=\"libmtp_rules_end\"\n");
++ printf("# Canon scanners that look like MTP devices (PID 0x22nn)\n");
++ printf("ATTR{idVendor}==\"04a9\", ATTR{idProduct}==\"22*\", GOTO=\"libmtp_rules_end\"\n");
+ printf("\n");
+ break;
+ case style_udev_old:
+--
+1.7.7.6
+
diff --git a/libmtp.spec b/libmtp.spec
index cc00057..765f8f2 100644
--- a/libmtp.spec
+++ b/libmtp.spec
@@ -3,12 +3,13 @@
Name: libmtp
Version: 1.1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A software library for MTP media players
URL: http://libmtp.sourceforge.net/
Group: System Environment/Libraries
Source0: http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0: 0001-Skip-probe-on-Canon-0x22-products.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
License: LGPLv2+
Requires: udev
@@ -43,6 +44,7 @@ library for MTP media players.
%prep
%setup -q
+%patch0 -p1 -b .canonscanner
%build
%configure --disable-static \
@@ -102,6 +104,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Jan 28 2012 Linus Walleij <triad at df.lth.se> 1.1.2-2
+- Bugfix to avoid probing Canon scanners
+
* Thu Jan 12 2012 Linus Walleij <triad at df.lth.se> 1.1.2-1
- Upstream update to use libusb-1.0 and other fixes.
More information about the scm-commits
mailing list