rpms/hplip/F-11 hplip-device-id.patch, 1.1, 1.2 hplip.spec, 1.205, 1.206

Tim Waugh twaugh at fedoraproject.org
Thu Jul 23 10:08:51 UTC 2009


Author: twaugh

Update of /cvs/pkgs/rpms/hplip/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3728

Modified Files:
	hplip-device-id.patch hplip.spec 
Log Message:
* Thu Jul 23 2009 Tim Waugh <twaugh at redhat.com> 3.9.2-7
- Error checking in the libudev device-id fallback code.


hplip-device-id.patch:
 Makefile.am     |    4 -
 Makefile.in     |    4 -
 io/hpmud/musb.c |  164 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 157 insertions(+), 15 deletions(-)

Index: hplip-device-id.patch
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-11/hplip-device-id.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- hplip-device-id.patch	21 Jul 2009 22:49:07 -0000	1.1
+++ hplip-device-id.patch	23 Jul 2009 10:08:50 -0000	1.2
@@ -1,6 +1,5 @@
-diff -up hplip-3.9.2/io/hpmud/musb.c.device-id hplip-3.9.2/io/hpmud/musb.c
---- hplip-3.9.2/io/hpmud/musb.c.device-id	2009-02-20 00:36:44.000000000 +0000
-+++ hplip-3.9.2/io/hpmud/musb.c	2009-07-21 23:43:07.016138839 +0100
+--- hplip-3.9.2/io/hpmud/musb.c	2009-07-21 23:43:07.016138839 +0100
++++ hplip-3.9.2/io/hpmud/musb.c	2009-07-23 11:04:59.504163043 +0100
 @@ -26,6 +26,8 @@
  
  #include "hpmud.h"
@@ -10,7 +9,7 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
  
  mud_device_vf __attribute__ ((visibility ("hidden"))) musb_mud_device_vf = 
  {
-@@ -1959,6 +1961,137 @@ bugout:
+@@ -1959,6 +1961,143 @@
   * USB probe devices, walk the USB bus(s) looking for HP products.
   */
  
@@ -115,6 +114,9 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
 +			udev_device_get_parent_with_subsystem_devtype (ddev,
 +								       "usb",
 +								       "usb_device");
++		    if (!parent_dev)
++			continue;
++
 +		    idVendor = udev_device_get_sysattr_value (parent_dev,
 +							      "idVendor");
 +		    if (!idVendor || strcmp (idVendor, "03f0"))
@@ -134,6 +136,9 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
 +
 +		    ieee1284_id = udev_device_get_sysattr_value (ddev,
 +								 "ieee1284_id");
++		    if (!ieee1284_id)
++			continue;
++
 +		    strncpy (device_id, ieee1284_id, len);
 +		    device_id[len - 1] = '\0';
 +		}
@@ -148,7 +153,7 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
  int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int lst_size, int *cnt)
  {
     struct usb_bus *bus;
-@@ -2006,6 +2139,7 @@ int __attribute__ ((visibility ("hidden"
+@@ -2006,6 +2145,7 @@
  
              if (model[0])
              {
@@ -156,7 +161,7 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
                 snprintf(sz, sizeof(sz), "hp:/usb/%s?serial=%s", model, serial);
  
                 /* See if device is supported by hplip. */
-@@ -2016,17 +2150,19 @@ int __attribute__ ((visibility ("hidden"
+@@ -2016,17 +2156,19 @@
                    continue;           /* ignor, not supported */
                 }
  
@@ -187,7 +192,6 @@ diff -up hplip-3.9.2/io/hpmud/musb.c.dev
                 *cnt+=1;
              }
           }
-diff -up hplip-3.9.2/Makefile.am.device-id hplip-3.9.2/Makefile.am
 --- hplip-3.9.2/Makefile.am.device-id	2009-02-20 00:36:58.000000000 +0000
 +++ hplip-3.9.2/Makefile.am	2009-07-21 23:41:16.262138141 +0100
 @@ -218,9 +218,9 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i
@@ -202,7 +206,6 @@ diff -up hplip-3.9.2/Makefile.am.device-
  endif
  libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
  
-diff -up hplip-3.9.2/Makefile.in.device-id hplip-3.9.2/Makefile.in
 --- hplip-3.9.2/Makefile.in.device-id	2009-02-20 00:37:52.000000000 +0000
 +++ hplip-3.9.2/Makefile.in	2009-07-21 23:41:16.272138156 +0100
 @@ -3954,8 +3954,8 @@ dist_unrel_DATA = 


Index: hplip.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hplip/F-11/hplip.spec,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -p -r1.205 -r1.206
--- hplip.spec	21 Jul 2009 22:49:07 -0000	1.205
+++ hplip.spec	23 Jul 2009 10:08:50 -0000	1.206
@@ -1,7 +1,7 @@
 Summary: HP Linux Imaging and Printing Project
 Name: hplip
 Version: 3.9.2
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: GPLv2+ and MIT
 Group: System Environment/Daemons
 Conflicts: system-config-printer < 0.6.132
@@ -336,6 +336,9 @@ fi
 exit 0
 
 %changelog
+* Thu Jul 23 2009 Tim Waugh <twaugh at redhat.com> 3.9.2-7
+- Error checking in the libudev device-id fallback code.
+
 * Tue Jul 21 2009 Tim Waugh <twaugh at redhat.com> 3.9.2-6
 - Fixed device-id reporting.
 




More information about the scm-commits mailing list