From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 4 09:11:20 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9339216A4CE for ; Thu, 4 Mar 2004 09:11:20 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EC6E43D39 for ; Thu, 4 Mar 2004 09:11:20 -0800 (PST) (envelope-from underway@comcast.net) Received: from localhost.localdomain (c-24-17-47-224.client.comcast.net[24.17.47.224]) by comcast.net (rwcrmhc12) with ESMTP id <20040304171119014008aru7e>; Thu, 4 Mar 2004 17:11:19 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) i24HCvpZ043961; Thu, 4 Mar 2004 09:12:57 -0800 (PST) (envelope-from underway@comcast.net) Received: (from jojo@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id i24HCpdl043960; Thu, 4 Mar 2004 09:12:51 -0800 (PST) (envelope-from underway@comcast.net) To: Bruce Evans References: <61wu61h828.u61@mail.comcast.net> <20040304181246.T6033@gamplex.bde.org> From: underway@comcast.net (Gary W. Swearingen) Date: Thu, 04 Mar 2004 09:12:51 -0800 In-Reply-To: <20040304181246.T6033@gamplex.bde.org> (Bruce Evans's message of "Thu, 4 Mar 2004 18:42:28 +1100 (EST)") Message-ID: <6wn06wfsdo.06w@mail.comcast.net> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-bugs@FreeBSD.org 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 List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2004 17:11:20 -0000 Thanks Bruce. Some of that went over my head, but here's a replacement patch that seems to work. (My use of the stock lptcontrol was giving "lptcontrol: open: Device busy" which the patch fixes.) I slipped in an improvement (?) to the "usage" string. I tested (?) it by "making" it an running the new program without error, but I know of no way to determine whether it actually changed lpt0's mode. I'll file another PR on the manpage's FILES section later. --- lptcontrol.c.orig Sat May 3 14:06:37 2003 +++ lptcontrol.c Thu Mar 4 09:06:06 2004 @@ -46,8 +46,7 @@ #include -#define PATH_LPCTL _PATH_DEV "lpctl" -#define DEFAULT_DEVICE _PATH_DEV "lpt0" +#define DEFAULT_DEVICE _PATH_DEV "lpt0.ctl" #define IRQ_INVALID -1 #define DO_POLL 0 #define USE_IRQ 1 @@ -56,7 +55,7 @@ static void usage(void) { - fprintf(stderr, "usage: lptcontrol -i | -p | -s | -e [-d device]\n"); + fprintf(stderr, "usage: lptcontrol -i | -p | -s | -e [-d lpt-control-device]\n"); exit(1); }