diff --git a/backend/usb-unix.c b/backend/usb-unix.c index 41a5606..004f116 100644 --- a/backend/usb-unix.c +++ b/backend/usb-unix.c @@ -93,6 +93,9 @@ print_device(const char *uri, /* I - Device URI */ _cups_strncasecmp(hostname, "Minolta", 7); #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ + if (use_bc && !strncmp(uri, "usb:/dev/", 9)) + use_bc = 0; + if ((device_fd = open_device(uri, &use_bc)) == -1) { if (getenv("CLASS") != NULL) @@ -315,12 +318,7 @@ open_device(const char *uri, /* I - Device URI */ 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)) {