FreeBSD Bugzilla – Attachment 14109 Details for
Bug 26562
[lpt] [patch] /dev/lpt0 returns EBUSY when attempting to open "Ready Printer"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.08 KB, created by
ve3wwg
on 2001-04-14 04:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ve3wwg
Created:
2001-04-14 04:50:00 UTC
Size:
3.08 KB
patch
obsolete
>*** lpt.c Fri Apr 13 22:28:32 2001 >--- hacked.lpt.c Fri Apr 13 23:32:37 2001 >*************** >*** 171,183 **** > > > /* status masks to interrogate printer status */ >! #define RDY_MASK (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR) /* ready ? */ >! #define LP_READY (LPS_SEL|LPS_NBSY|LPS_NERR) > > /* Printer Ready condition - from lpa.c */ > /* Only used in polling code */ >! #define LPS_INVERT (LPS_NBSY | LPS_NACK | LPS_SEL | LPS_NERR) >! #define LPS_MASK (LPS_NBSY | LPS_NACK | LPS_OUT | LPS_SEL | LPS_NERR) > #define NOT_READY(ppbus) ((ppb_rstr(ppbus)^LPS_INVERT)&LPS_MASK) > > #define MAX_SLEEP (hz*5) /* Timeout while waiting for device ready */ >--- 171,183 ---- > > > /* status masks to interrogate printer status */ >! #define RDY_MASK (/*LPS_SEL|*/LPS_OUT|LPS_NBSY|LPS_NERR) /* ready ? */ >! #define LP_READY (/*LPS_SEL|*/LPS_NBSY|LPS_NERR) > > /* Printer Ready condition - from lpa.c */ > /* Only used in polling code */ >! #define LPS_INVERT (LPS_NBSY | LPS_NACK | /*LPS_SEL |*/ LPS_NERR) >! #define LPS_MASK (LPS_NBSY | LPS_NACK | LPS_OUT | /*LPS_SEL |*/ LPS_NERR) > #define NOT_READY(ppbus) ((ppb_rstr(ppbus)^LPS_INVERT)&LPS_MASK) > > #define MAX_SLEEP (hz*5) /* Timeout while waiting for device ready */ >*************** >*** 538,545 **** > > /* is printer online and ready for output */ > } while ((ppb_rstr(ppbus) & >! (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != >! (LPS_SEL|LPS_NBSY|LPS_NERR)); > > sc->sc_control = LPC_SEL|LPC_NINIT; > if (sc->sc_flags & LP_AUTOLF) >--- 538,545 ---- > > /* is printer online and ready for output */ > } while ((ppb_rstr(ppbus) & >! (/*LPS_SEL|*/LPS_OUT|LPS_NBSY|LPS_NERR)) != >! (/*LPS_SEL|*/LPS_NBSY|LPS_NERR)); > > sc->sc_control = LPC_SEL|LPC_NINIT; > if (sc->sc_flags & LP_AUTOLF) >*************** >*** 598,605 **** > /* if the last write was interrupted, don't complete it */ > if((!(sc->sc_state & INTERRUPTED)) && (sc->sc_irq & LP_USE_IRQ)) > while ((ppb_rstr(ppbus) & >! (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != >! (LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) > /* wait 1/4 second, give up if we get a signal */ > if (tsleep((caddr_t)lptdev, LPPRI|PCATCH, > "lpclose", hz) != EWOULDBLOCK) >--- 598,605 ---- > /* if the last write was interrupted, don't complete it */ > if((!(sc->sc_state & INTERRUPTED)) && (sc->sc_irq & LP_USE_IRQ)) > while ((ppb_rstr(ppbus) & >! (/*LPS_SEL|*/LPS_OUT|LPS_NBSY|LPS_NERR)) != >! (/*LPS_SEL|*/LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) > /* wait 1/4 second, give up if we get a signal */ > if (tsleep((caddr_t)lptdev, LPPRI|PCATCH, > "lpclose", hz) != EWOULDBLOCK)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26562
: 14109