USB printer configures up as /dev/usblp0 but should be /dev/usb/lp0 #818

Closed
michaelrsweet opened this Issue Jul 18, 2004 · 3 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Jul 18, 2004

Version: 1.1.21rc1
CUPS.org User: cbm.sfu

I run Gentoo ~x86. Recently upgraded to 1.1.21rc1 from 1.1.20. Using the web interface to setup my printer (an epson c42ux) resulted in DeviceURI of usb:/dev/usblp0. However, my system only has /dev/usb/lp0.

I'm using DEVFS. Perhaps /dev/usblp0 is correct for udev or something like that?

(don't think it matters but I'm running the gimp-print drivers 4.2.6)

Collaborator

michaelrsweet commented Jul 19, 2004

CUPS.org User: kmuto.debian

This is a fallback problem.
When CUPS failed to detect USB device (it happens when user uses udev
or devfs), CUPS uses /dev/usblp0 as default. /dev/usblp0 is invalid
for many FHS compatible Linux distributions.

Here is a patch.

--- backend/usb-unix.c.old 2004-07-13 20:39:39.000000000 -0400
+++ backend/usb-unix.c 2004-07-14 08:51:49.000000000 -0400
@@ -426,12 +426,12 @@

  • First figure out which USB printer filename to use...
    */
  • if (access("/dev/usb/lp0", 0) == 0)
  • strcpy(format, "/dev/usb/lp%d");
  • if (access("/dev/usblp0", 0) == 0)
  • strcpy(format, "/dev/usblp%d");
    else if (access("/dev/usb/usblp0", 0) == 0)
    strcpy(format, "/dev/usb/usblp%d");
    else
  • strcpy(format, "/dev/usblp%d");
  • strcpy(format, "/dev/usb/lp%d");

/*

  • Then open each USB device...
Collaborator

michaelrsweet commented Aug 2, 2004

CUPS.org User: mike

Applied kmuto's patch (there were actually two places this needed to happen) for 1.1.21rc2.

Thanks!

Collaborator

michaelrsweet commented Aug 2, 2004

CUPS.org User: mike

Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment