1 diff -up cups-1.5b1/backend/usb-unix.c.uri-compat cups-1.5b1/backend/usb-unix.c
2 --- cups-1.5b1/backend/usb-unix.c.uri-compat 2011-05-24 15:59:05.000000000 +0200
3 +++ cups-1.5b1/backend/usb-unix.c 2011-05-24 16:02:03.000000000 +0200
4 @@ -63,11 +63,34 @@ print_device(const char *uri, /* I - De
5 int device_fd; /* USB device */
6 ssize_t tbytes; /* Total number of bytes written */
7 struct termios opts; /* Parallel port options */
8 + char *fixed_uri = strdup (uri);
15 + p = strchr (fixed_uri, ':');
19 + p += strspn (p, "/");
20 + e = strchr (p, '/');
23 + size_t mfrlen = e - p;
25 + if (!strncasecmp (e, p, mfrlen))
27 + char *x = e + mfrlen;
28 + if (!strncmp (x, "%20", 3))
29 + /* Take mfr name out of mdl name for compatibility with
30 + * Fedora 11 before bug #507244 was fixed. */
31 + strcpy (e, x + 3); puts(fixed_uri);
37 * Open the USB port device...
39 @@ -107,10 +130,10 @@ print_device(const char *uri, /* I - De
40 _cups_strncasecmp(hostname, "Minolta", 7);
41 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
43 - if (use_bc && !strncmp(uri, "usb:/dev/", 9))
44 + if (use_bc && !strncmp(fixed_uri, "usb:/dev/", 9))
47 - if ((device_fd = open_device(uri, &use_bc)) == -1)
48 + if ((device_fd = open_device(fixed_uri, &use_bc)) == -1)
50 if (getenv("CLASS") != NULL)