Return EIO instead of EFAULT when read/write is too big or small.

This commit is contained in:
jeremy 1997-05-16 05:33:48 +00:00
parent d697818b06
commit 70d1c8b8c8
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: leds.c,v 1.1 1997/03/18 22:21:52 gwr Exp $ */
/* $NetBSD: leds.c,v 1.2 1997/05/16 05:33:48 jeremy Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -103,7 +103,7 @@ leds_uio(struct uio *uio)
off = uio->uio_offset;
if ((off < 0) || (off > sizeof(ledpat)))
return (EFAULT);
return (EIO);
cnt = min(uio->uio_resid, (sizeof(ledpat) - off));
if (cnt == 0)