bin/63718: lptcontrol.c has unused PATH_LPCTL definition.
Gary W. Swearingen
underway at comcast.net
Thu Mar 4 09:11:20 PST 2004
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);
}
More information about the freebsd-bugs
mailing list