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:
njl 2002-12-31 21:44:38 +00:00
parent e9b55e634e
commit 34ac065b02
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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)