summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-09-26 19:55:48 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-09-26 19:55:48 +0000
commit2342f7c7dc3a07128b99d6b670959110efd6b196 (patch)
tree4dceb243c0e24bc14d041d0e2ffffd0e764ddf95 /sys
parente2533f61cea5353b35646a2f91036144add8297e (diff)
Return EIO if reading fails.
ok drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/stand/hfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/macppc/stand/hfs.c b/sys/arch/macppc/stand/hfs.c
index 7e591403b09..1cb959b81ec 100644
--- a/sys/arch/macppc/stand/hfs.c
+++ b/sys/arch/macppc/stand/hfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hfs.c,v 1.3 2003/10/16 04:30:09 drahn Exp $ */
+/* $OpenBSD: hfs.c,v 1.4 2005/09/26 19:55:47 kettenis Exp $ */
/* $NetBSD: hfs.c,v 1.1 2000/11/14 11:25:35 tsubai Exp $ */
/*-
@@ -82,6 +82,8 @@ hfs_read(struct open_file *f, void *start, size_t size, size_t *resid)
int len;
len = OF_read(OF_fd, start, size);
+ if (len == -1)
+ return EIO;
size -= len;
if (resid)
*resid = size;