9fans archive / 2000 / 08 / 37 / prev next
From: "D. Brownlee" <ancipites@ear...>
Subject: Re: [9fans] problems
Date: Tue, 01 Aug 2000 13:42:34 -0700
Hello,
The lpt driver is in /sys/src/9/pc/devlpt.c. That file has a
function outch():
for (tries = 0;; tries++){
status = inb(base+Qpsr);
if(!(status & Fselect) || !(status & Fnoerror))
Error(Eio); /* occurs when the paper tray is empty */
.
.
.
}
which might be changed to:
for (tries = 0;; tries++){
status = inb(base+Qpsr);
if(!(status & Fselect) || !(status & Fnoerror))
if (!(status & Fpe)) { /* paper ran out */
tries = 0;
continue;
}
else
Error(Eio);
.
.
.
}
I haven't tried this -- I haven't discovered how to rebuild
the kernel yet. 'Fpe' is already defined in devlpt.c. I may
have the test on 'Fpe' inverted -- don't know.
I think that the desired behaviour is that when the paper
runs out this will wait until someone comes by and installs
some paper, which should cause the 'Fpe' bit to change. That
is how some other PC *nix systems behave.
D. Brownlee
Russ Cox wrote:
>
> 1. My printer's paper tray doesn't hold enough sheets to
> print the manuals. It looks as though, in devlpt.c, that
> outch() doesn't check for Fpe when it finds an error. This
> was encountered when trying to print vol1.ps.
>
> That has always annoyed me. If you
> tell me what the code should be I'll fix it.
>
> Russ