3582768
diff -up cups-1.4rc1/backend/usb-unix.c.uri-compat cups-1.4rc1/backend/usb-unix.c
3582768
--- cups-1.4rc1/backend/usb-unix.c.uri-compat	2009-07-15 10:48:46.992133677 +0100
3582768
+++ cups-1.4rc1/backend/usb-unix.c	2009-07-15 10:49:05.305008114 +0100
3582768
@@ -63,11 +63,34 @@ print_device(const char *uri,		/* I - De
3582768
   int		device_fd;		/* USB device */
3582768
   size_t	tbytes;			/* Total number of bytes written */
3582768
   struct termios opts;			/* Parallel port options */
3582768
+  char		*fixed_uri = strdup (uri);
3582768
+  char		*p;
3582768
 
3582768
 
3582768
   (void)argc;
3582768
   (void)argv;
3582768
 
3582768
+  p = strchr (fixed_uri, ':');
3582768
+  if (p++ != NULL)
3582768
+  {
3582768
+    char *e;
3582768
+    p += strspn (p, "/");
3582768
+    e = strchr (p, '/');
3582768
+    if (e > p)
3582768
+    {
3582768
+      size_t mfrlen = e - p;
3582768
+      e++;
3582768
+      if (!strncasecmp (e, p, mfrlen))
3582768
+      {
3582768
+	char *x = e + mfrlen;
3582768
+	if (!strncmp (x, "%20", 3))
3582768
+	  /* Take mfr name out of mdl name for compatibility with
3582768
+	   * Fedora 11 before bug #507244 was fixed. */
3582768
+	  strcpy (e, x + 3); puts(fixed_uri);
3582768
+      }
3582768
+    }
3582768
+  }
3582768
+
3582768
  /*
3582768
   * Open the USB port device...
3582768
   */
3582768
@@ -107,10 +130,10 @@ print_device(const char *uri,		/* I - De
3582768
              strncasecmp(hostname, "Minolta", 7);
3582768
 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
3582768
 
3582768
-    if (use_bc && !strncmp(uri, "usb:/dev/", 9))
3582768
+    if (use_bc && !strncmp(fixed_uri, "usb:/dev/", 9))
3582768
       use_bc = 0;
3582768
 
3582768
-    if ((device_fd = open_device(uri, &use_bc)) == -1)
3582768
+    if ((device_fd = open_device(fixed_uri, &use_bc)) == -1)
3582768
     {
3582768
       if (getenv("CLASS") != NULL)
3582768
       {