Re: Printing to off-line printer in 2.4.0-prerelease

From: Peter Osterlund (peter.osterlund@mailbox.swipnet.se)
Date: Thu Jan 04 2001 - 14:07:19 EST


Tim Waugh <twaugh@redhat.com> writes:

> On Thu, Jan 04, 2001 at 02:52:29PM +0100, Andrea Arcangeli wrote:
>
> > I think lp_check_status.
>
> Okay. So what about this patch instead? If the printer is off-line
> to start with, fall into parport_write anyway (it will just time out
> and return 0). If LP_ABORT is set, we return -EAGAIN.

If you do this, you should probably also return -EAGAIN if the printer
is out of paper, otherwise I would still lose data when the printer
goes out of paper. Currently it returns -ENOSPC in this situation. I
suppose the different return codes were meant as a way for user space
to be able to know why printing failed, so that it could take
appropriate actions, but maybe this is not used by any programs.

-- 
Peter Österlund             peter.osterlund@mailbox.swipnet.se
Sköndalsvägen 35            http://home1.swipnet.se/~w-15919
S-128 66 Sköndal            +46 8 942647
Sweden

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:19 EST