summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ppbus/lpt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index b83cc03..a7f8dd9 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -695,6 +695,11 @@ lptread(dev_t dev, struct uio *uio, int ioflag)
device_t ppbus = device_get_parent(lptdev);
int error = 0, len;
+ if (sc->sc_flags & LP_BYPASS) {
+ /* we can't do reads in bypass mode */
+ return (EPERM);
+ }
+
if ((error = ppb_1284_negociate(ppbus, PPB_NIBBLE, 0)))
return (error);
OpenPOWER on IntegriCloud