Messages in this thread | | | Date | Tue, 23 Feb 1999 21:21:25 +0000 (GMT) | From | Tim Waugh <> | Subject | Re: How to enable LPSTRICT option (kernel 2.0.36 - printer driver)? |
| |
On Mon, 22 Feb 1999, Sergio Orsatti wrote:
> I have an Epson Stylus Color 600 and when using the irq mode to > print, it is very slow. Polled mode is fast. I've heard that this can be > corrected by enabling the LPSTRICT option when compiling the > kernel 2.0.36.
It's not a compile option; it's an ioctl. You need to do something like this:
#include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h>
#define LP_STRICT 0x0200 /* from linux/include/linux/lp.h */
int main (int argc, char *argv[]) { int fd; int strict;
if (argc < 3) return 1; strict = atoi (argv[2]); fd = open (argv[1], O_RDONLY | O_NONBLOCK); if (fd < 0) return 2; ioctl (fd, LP_STRICT, strict); close(fd); return 0; }
Possible there is a version of tunelp that does this -- Andrea?
Tim. */
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |