Date: Fri, 5 Mar 2004 08:30:11 -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: <200403051630.i25GUBj4079225@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
Subject: Re: bin/63718: lptcontrol.c has unused PATH_LPCTL definition.
Date: Sat, 6 Mar 2004 03:26:14 +1100 (EST)
[Qouting everything since so that it gets sent to gnats]
On Thu, 4 Mar 2004, Gary W. Swearingen wrote:
> 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);
> }
>
Yes, that seems to be all that is necessary. But I want to change devfs
name to be the same as in RELENG_4 ("lpctl0"). Then no changes would be
needed to the man page.
Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403051630.i25GUBj4079225>
