2011-05-24 12:27:29 +00:00
|
|
|
diff -up cups-1.5b1/backend/usb-unix.c.direct-usb cups-1.5b1/backend/usb-unix.c
|
|
|
|
--- cups-1.5b1/backend/usb-unix.c.direct-usb 2011-05-20 05:49:49.000000000 +0200
|
|
|
|
+++ cups-1.5b1/backend/usb-unix.c 2011-05-23 17:52:14.000000000 +0200
|
|
|
|
@@ -102,6 +102,9 @@ print_device(const char *uri, /* I - De
|
|
|
|
_cups_strncasecmp(hostname, "Minolta", 7);
|
2007-06-13 16:43:07 +00:00
|
|
|
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
|
|
|
|
|
2006-07-14 11:02:44 +00:00
|
|
|
+ if (use_bc && !strncmp(uri, "usb:/dev/", 9))
|
|
|
|
+ use_bc = 0;
|
2007-06-13 16:43:07 +00:00
|
|
|
+
|
2006-07-14 11:02:44 +00:00
|
|
|
if ((device_fd = open_device(uri, &use_bc)) == -1)
|
|
|
|
{
|
2007-06-13 16:43:07 +00:00
|
|
|
if (getenv("CLASS") != NULL)
|
2011-05-24 12:27:29 +00:00
|
|
|
@@ -331,12 +334,7 @@ open_device(const char *uri, /* I - Dev
|
2006-04-04 15:10:37 +00:00
|
|
|
if (!strncmp(uri, "usb:/dev/", 9))
|
|
|
|
#ifdef __linux
|
2006-07-04 16:58:59 +00:00
|
|
|
{
|
|
|
|
- /*
|
|
|
|
- * Do not allow direct devices anymore...
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
- errno = ENODEV;
|
|
|
|
- return (-1);
|
2006-04-04 15:10:37 +00:00
|
|
|
+ return (open(uri + 4, O_RDWR | O_EXCL));
|
2006-07-04 16:58:59 +00:00
|
|
|
}
|
2006-04-04 15:10:37 +00:00
|
|
|
else if (!strncmp(uri, "usb://", 6))
|
|
|
|
{
|