]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - cups/patches/cups-direct-usb.patch
Move all packages to root.
[people/amarx/ipfire-3.x.git] / cups / patches / cups-direct-usb.patch
1 diff -up cups-1.3.7/backend/usb-unix.c.direct-usb cups-1.3.7/backend/usb-unix.c
2 --- cups-1.3.7/backend/usb-unix.c.direct-usb 2008-03-26 16:02:45.000000000 +0000
3 +++ cups-1.3.7/backend/usb-unix.c 2008-07-15 13:25:56.000000000 +0100
4 @@ -94,6 +94,9 @@ print_device(const char *uri, /* I - De
5 strncasecmp(hostname, "Minolta", 7);
6 #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */
7
8 + if (use_bc && !strncmp(uri, "usb:/dev/", 9))
9 + use_bc = 0;
10 +
11 if ((device_fd = open_device(uri, &use_bc)) == -1)
12 {
13 if (getenv("CLASS") != NULL)
14 @@ -320,12 +323,7 @@ open_device(const char *uri, /* I - Dev
15 if (!strncmp(uri, "usb:/dev/", 9))
16 #ifdef __linux
17 {
18 - /*
19 - * Do not allow direct devices anymore...
20 - */
21 -
22 - errno = ENODEV;
23 - return (-1);
24 + return (open(uri + 4, O_RDWR | O_EXCL));
25 }
26 else if (!strncmp(uri, "usb://", 6))
27 {