From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <39873639.951BBF88@earthlink.net> Date: Tue, 1 Aug 2000 13:42:34 -0700 From: "D. Brownlee" MIME-Version: 1.0 To: Russ Cox CC: 9fans@cse.psu.edu Subject: Re: [9fans] problems References: <200008011909.PAA15275@smtp3.fas.harvard.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: f17d27e8-eac8-11e9-9e20-41e7f4b1d025 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