cups/cups-direct-usb.patch

26 lines
686 B
Diff
Raw Normal View History

2006-10-23 15:58:48 +00:00
--- cups-1.2.5/backend/usb-unix.c.direct-usb 2006-10-12 20:19:47.000000000 +0100
+++ cups-1.2.5/backend/usb-unix.c 2006-10-23 14:15:36.000000000 +0100
@@ -86,6 +86,8 @@
2006-07-14 11:02:44 +00:00
2006-10-23 15:58:48 +00:00
use_bc = strcasecmp(hostname, "Canon") != 0 ||
strstr(hostname, "Minolta") != NULL;
2006-07-14 11:02:44 +00:00
+ if (use_bc && !strncmp(uri, "usb:/dev/", 9))
+ use_bc = 0;
if ((device_fd = open_device(uri, &use_bc)) == -1)
{
2006-10-23 15:58:48 +00:00
@@ -303,12 +305,7 @@
if (!strncmp(uri, "usb:/dev/", 9))
#ifdef __linux
{
- /*
- * Do not allow direct devices anymore...
- */
-
- errno = ENODEV;
- return (-1);
+ return (open(uri + 4, O_RDWR | O_EXCL));
}
else if (!strncmp(uri, "usb://", 6))
{