Return an error when r/w is requested on an unsupported device instead of
looping. Submitted by: Sean Kelly <smkelly@zombie.org> Pointed out by: bde
This commit is contained in:
parent
e9b55e634e
commit
34ac065b02
@ -195,6 +195,9 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||
return (EFAULT);
|
||||
error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio);
|
||||
continue;
|
||||
|
||||
default:
|
||||
return (ENODEV);
|
||||
}
|
||||
|
||||
if (error)
|
||||
|
@ -195,6 +195,9 @@ mmrw(dev_t dev, struct uio *uio, int flags)
|
||||
return (EFAULT);
|
||||
error = uiomove((caddr_t)(int)uio->uio_offset, (int)c, uio);
|
||||
continue;
|
||||
|
||||
default:
|
||||
return (ENODEV);
|
||||
}
|
||||
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user