bin/63718: lptcontrol.c has unused PATH_LPCTL definition.
Bruce Evans
bde at zeta.org.au
Fri Mar 5 08:30:12 PST 2004
The following reply was made to PR bin/63718; it has been noted by GNATS.
From: Bruce Evans <bde at zeta.org.au>
To: "Gary W. Swearingen" <underway at comcast.net>
Cc: freebsd-gnats-submit at 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
More information about the freebsd-bugs
mailing list