do { /* printer has no data for reading, "not ready" */
lp_read_terminate(minor);
if (file->f_flags & O_NONBLOCK)
return -EAGAIN;
if (current->signal & ~current->blocked)
return -EINTR;
current->state=TASK_INTERRUPTIBLE;
current->timeout=jiffies+1;
schedule();
retval=parport_ieee1284_nibble_mode_ok\
(lp_table[minor].dev->port, 0);
} while (retval == 2);
As you see, we are polling inside the driver, but this is the only
possiblity to wait without interrupt configured.
> Does select() work on the lp device? This would be a nice alternative to
> nonblocking IO.
Unfortunality select() is not implemented (yet :) ). This would be very nice,
indeed.
Ciao
Carsten
-- Carsten Gross Internet: carsten@sol.wohnheim.uni-ulm.de Wohnheim Heilmeyersteige: Sebastian Kneipp Weg 6, 89075 Ulm