- ansi prototypes in lpt.c
- a bit of tidying in lpt.c
- ioctl in lpt.c for switching between polling and using interrupts
- added lpt.h - needed for ioctl to allow switching between polling
and interrupt-driven modes.
Date: Tue, 28 Sep 1993 09:03:13 +0100 (MET)
The only place I found with a printf("status %x") is in /sys/i386/isa/lpt.c,
and looks much like a left-over debugging printout...
And it was... I changed it to an lprintf (which is defined if debuggin is on)
Rod
lpt doesn't work here if the printer is not turned on at boot time (this
has been reported for other systems).
lpt has a weird mapping of the flag bits vs printer numbers and MAKEDEV
does not understand this (printer 0 uses minor numbers 0-0x3f, printer 1
uses minors 0x40-0x7f, etc).
The following (simpler) problems are fixed by the patch.
lpt did not check the minor number on open, so if NLPT1 == 1 and you
try to open printer 1 then random memory above the lpt_sc array is
accessed. I thought I had this problem for minors 1 and 2. However,
it does not actually occur until minor 0x40. Does anyone have lpt64?
lpt had several unnecessary && broken ANSIisms and other sloppy
declarations.
Bruce