Date: Thu, 04 Mar 2004 09:12:51 -0800 From: underway@comcast.net (Gary W. Swearingen) To: Bruce Evans <bde@zeta.org.au> Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/63718: lptcontrol.c has unused PATH_LPCTL definition. Message-ID: <6wn06wfsdo.06w@mail.comcast.net> In-Reply-To: <20040304181246.T6033@gamplex.bde.org> (Bruce Evans's message of "Thu, 4 Mar 2004 18:42:28 %2B1100 (EST)") References: <61wu61h828.u61@mail.comcast.net> <20040304181246.T6033@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/types.h> -#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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6wn06wfsdo.06w>