I _HATE_ crashes. The lptread() call needs to check LP_BYPASS, because
if one tries to use read() on an LP_BYPASS'd dev_t, the softc will be initialized mainly with NULLs, so...
This commit is contained in:
parent
7b12e51659
commit
3841bf81f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58082
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user