Date: Wed, 3 Mar 2004 23:50:09 -0800 (PST) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/63718: lptcontrol.c has unused PATH_LPCTL definition. Message-ID: <200403040750.i247o9g0055211@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/63718; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: "Gary W. Swearingen" <underway@comcast.net> Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: bin/63718: lptcontrol.c has unused PATH_LPCTL definition. Date: Thu, 4 Mar 2004 18:42:28 +1100 (EST) On Wed, 3 Mar 2004, Gary W. Swearingen wrote: > >Description: > > lptcontrol.c has unused PATH_LPCTL definition. Not using it is the bug. From lptcontrol(4): % ... % -d device % Set the mode of the printer device specified by device. The % default value for device is /dev/lpt0. The default should be the control device, but rev.1.7 of lptcontrol.c broke this. The data device a completely bogus default for the control program. Using it sometimes causes lptcontrol to hang or have undesirable side effects. You can work around this by specifying the control device using -d and never using the default, but this shouldn't be necessary. % FILES % /dev/lpt? printer devices % /dev/lpctl? printer control devices The name of the control devices is documented here. This is also broken in -current. The device name has 1 spelling error and 2 lexical errors in devfs ("lpctl0" became "lpt0.ctl"). Both MAKEDEV and devfs are missing support for the all but 2 of the 64 mostly-undocumented subdevices per minor. You can encode auto-linefeed and 5 other attributes in the minor number. One of the attributes is LP_BYPASS, whose comment says that it is to bypass printer-ready checks but which actually encodes being a control device, so there are only 33 useful subdevices per minor (32 data ones and 1 control one). devfs only creates 2 of these. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403040750.i247o9g0055211>