landgraf / rpms / cups

Forked from rpms/cups 6 years ago
Clone
b9b25a9
--- cups-1.2.7/backend/usb-unix.c.direct-usb	2006-11-15 20:28:39.000000000 +0000
b9b25a9
+++ cups-1.2.7/backend/usb-unix.c	2006-11-16 16:23:51.000000000 +0000
b9b25a9
@@ -85,6 +85,8 @@
b9b25a9
     */
b32a2ee
 
b9b25a9
     use_bc = strcasecmp(hostname, "Canon") && !strstr(hostname, "Minolta");
b32a2ee
+    if (use_bc && !strncmp(uri, "usb:/dev/", 9))
b32a2ee
+      use_bc = 0;
b32a2ee
 
b32a2ee
     if ((device_fd = open_device(uri, &use_bc)) == -1)
b32a2ee
     {
b9b25a9
@@ -302,12 +304,7 @@
23fc700
   if (!strncmp(uri, "usb:/dev/", 9))
23fc700
 #ifdef __linux
c617a1d
   {
c617a1d
-   /*
c617a1d
-    * Do not allow direct devices anymore...
c617a1d
-    */
c617a1d
-
c617a1d
-    errno = ENODEV;
c617a1d
-    return (-1);
23fc700
+    return (open(uri + 4, O_RDWR | O_EXCL));
c617a1d
   }
23fc700
   else if (!strncmp(uri, "usb://", 6))
23fc700
   {