From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 3 23:50:10 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E9D016A4CE for ; Wed, 3 Mar 2004 23:50:10 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED1E243D39 for ; Wed, 3 Mar 2004 23:50:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i247o9bv055212 for ; Wed, 3 Mar 2004 23:50:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i247o9g0055211; Wed, 3 Mar 2004 23:50:09 -0800 (PST) (envelope-from gnats) Date: Wed, 3 Mar 2004 23:50:09 -0800 (PST) Message-Id: <200403040750.i247o9g0055211@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Subject: Re: bin/63718: lptcontrol.c has unused PATH_LPCTL definition. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 07:50:10 -0000 The following reply was made to PR bin/63718; it has been noted by GNATS. From: Bruce Evans To: "Gary W. Swearingen" 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