patch-1.3.98 linux/drivers/char/lp.c
Next file: linux/drivers/char/random.c
Previous file: linux/drivers/char/apm_bios.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Fri May 3 11:57:38 1996
- Orig file:
v1.3.97/linux/drivers/char/lp.c
- Orig date:
Tue Apr 2 13:32:20 1996
diff -u --recursive --new-file v1.3.97/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -183,14 +183,14 @@
if (lp_table[minor].runchars > LP_STAT(minor).maxrun)
LP_STAT(minor).maxrun = lp_table[minor].runchars;
status = LP_S(minor);
- if ((status & LP_POUTPA)) {
- printk(KERN_INFO "lp%d out of paper\n", minor);
- if (LP_F(minor) & LP_ABORT)
- return rc?rc:-ENOSPC;
- } else if (!(status & LP_PSELECD)) {
+ if ((status & LP_OFFL) || !(status & LP_PSELECD)) {
printk(KERN_INFO "lp%d off-line\n", minor);
if (LP_F(minor) & LP_ABORT)
return rc?rc:-EIO;
+ } else if ((status & LP_POUTPA)) {
+ printk(KERN_INFO "lp%d out of paper\n", minor);
+ if (LP_F(minor) & LP_ABORT)
+ return rc?rc:-ENOSPC;
} else if (!(status & LP_PERRORP)) {
printk(KERN_ERR "lp%d printer error\n", minor);
if (LP_F(minor) & LP_ABORT)
@@ -248,18 +248,18 @@
LP_STAT(minor).maxrun = lp_table[minor].runchars;
status = LP_S(minor);
- if (status & LP_POUTPA) {
- printk(KERN_INFO "lp%d out of paper\n", minor);
+ if ((status & LP_OFFL) || !(status & LP_PSELECD)) {
+ printk(KERN_INFO "lp%d off-line\n", minor);
if(LP_F(minor) & LP_ABORT)
- return temp-buf?temp-buf:-ENOSPC;
+ return temp-buf?temp-buf:-EIO;
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + LP_TIMEOUT_POLLED;
schedule();
} else
- if (!(status & LP_PSELECD)) {
- printk(KERN_INFO "lp%d off-line\n", minor);
+ if (status & LP_POUTPA) {
+ printk(KERN_INFO "lp%d out of paper\n", minor);
if(LP_F(minor) & LP_ABORT)
- return temp-buf?temp-buf:-EIO;
+ return temp-buf?temp-buf:-ENOSPC;
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + LP_TIMEOUT_POLLED;
schedule();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this