bin/63718: lptcontrol.c has unused PATH_LPCTL definition.
Bruce Evans
bde at zeta.org.au
Wed Mar 3 23:42:36 PST 2004
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
More information about the freebsd-bugs
mailing list