On Thu, Aug 14, 2014 at 03:08:29PM +0200, Alessandro DE LAURENZIS wrote:
> On Thu 14/08 14:46, Antoine Jacoutot wrote:
> > Can you try this patch:
> >
> > --- backend/usb-libusb.c.orig Mon Dec 9 20:26:47 2013
> > +++ backend/usb-libusb.c Thu Aug 14 14:45:19 2014
> > @@ -1473,9 +1473,14 @@
> > else
> > {
> > printer->usblp_attached = 0;
> > - fprintf(stderr, "DEBUG: Failed to check whether %04x:%04x has the
> > \"usblp\" kernel module attached\n",
> > - devdesc.idVendor, devdesc.idProduct);
> > - goto error;
> > +
> > + if (errcode != LIBUSB_ERROR_NOT_SUPPORTED)
> > + {
> > + fprintf(stderr,
> > + "DEBUG: Failed to check whether %04x:%04x has the \"usblp\" "
> > + "kernel module attached\n", devdesc.idVendor,
> > devdesc.idProduct);
> > + goto error;
> > + }
> > }
> >
> > /*
> >
>
> Hello Antoine,
>
> First of all, thanks a lot for the very quick feedback.
>
> I'm all but an expert, so bear with me: I'm not able to find the file
> you patched:
>
> just22@poseidon:[src]> ls -la
> total 120
> drwxrwxr-x 17 root wsrc 512 Aug 14 11:33 .
> drwxr-xr-x 19 root wheel 512 Aug 14 11:16 ..
> drwxr-xr-x 2 root wsrc 512 Aug 14 11:33 CVS
> -rw-r--r-- 1 root wsrc 3345 Jul 9 21:23 Makefile
> -rw-r--r-- 1 root wsrc 14303 Jul 16 03:23 Makefile.cross
> drwxr-xr-x 34 root wsrc 1024 Aug 14 11:33 bin
> drwxr-xr-x 27 root wsrc 1024 Aug 14 11:33 distrib
> drwxr-xr-x 33 root wsrc 2048 Aug 14 11:33 etc
> drwxr-xr-x 44 root wsrc 1024 Aug 14 11:33 games
> drwxr-xr-x 8 root wsrc 512 Aug 14 11:33 gnu
> drwxr-xr-x 7 root wsrc 2048 Aug 14 11:28 include
> drwxr-xr-x 35 root wsrc 1536 Aug 14 11:33 lib
> drwxr-xr-x 32 root wsrc 1536 Aug 14 11:33 libexec
> drwxr-xr-x 15 root wsrc 512 Aug 14 11:29 regress
> drwxr-xr-x 70 root wsrc 2560 Aug 14 11:33 sbin
> drwxr-xr-x 14 root wsrc 512 Aug 14 11:33 share
> drwxr-xr-x 27 root wsrc 1024 Aug 14 11:33 sys
> drwxr-xr-x 207 root wsrc 4608 Aug 14 11:33 usr.bin
> drwxr-xr-x 135 root wsrc 4096 Aug 14 11:33 usr.sbin
> just22@poseidon:[src]> find ./ -name "*usb-libusb.c*"
>
> This should be an updated source tree, of course.
> What am I doing wrong?
The patch was for cups...
Anyway, here is a patch directly for the print/cups port.
Apply it, rebuild cups and re-install the package.
Index: patches/patch-backend_usb-libusb_c
===================================================================
RCS file: patches/patch-backend_usb-libusb_c
diff -N patches/patch-backend_usb-libusb_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-backend_usb-libusb_c 14 Aug 2014 13:18:30 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- backend/usb-libusb.c.orig Mon Dec 9 20:26:47 2013
++++ backend/usb-libusb.c Thu Aug 14 15:18:15 2014
+@@ -1473,9 +1473,14 @@ open_device(usb_printer_t *printer, /* I - Printer
*/
+ else
+ {
+ printer->usblp_attached = 0;
+- fprintf(stderr, "DEBUG: Failed to check whether %04x:%04x has the
\"usblp\" kernel module attached\n",
+- devdesc.idVendor, devdesc.idProduct);
+- goto error;
++
++ if (errcode != LIBUSB_ERROR_NOT_SUPPORTED)
++ {
++ fprintf(stderr,
++ "DEBUG: Failed to check whether %04x:%04x has the \"usblp\" "
++ "kernel module attached\n", devdesc.idVendor,
devdesc.idProduct);
++ goto error;
++ }
+ }
+
+ /*
--
Antoine