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