summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/read.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-12-08 15:16:00 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-12-08 15:16:00 +0000
commit92f9d347b16f71e6f70d404ed02486584fa35d37 (patch)
treefc714075a9c2983138b748a37606718605bb2c85 /sys/lib/libsa/read.c
parent7b12c8734d7e8c4ce180c40d12c579291d401a9e (diff)
Merge to NetBSD 961207
Diffstat (limited to 'sys/lib/libsa/read.c')
-rw-r--r--sys/lib/libsa/read.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/lib/libsa/read.c b/sys/lib/libsa/read.c
index 3e12a716003..c1612521101 100644
--- a/sys/lib/libsa/read.c
+++ b/sys/lib/libsa/read.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: read.c,v 1.2 1996/09/23 14:19:02 mickey Exp $ */
-/* $NetBSD: read.c,v 1.5 1995/09/14 23:45:35 pk Exp $ */
+/* $OpenBSD: read.c,v 1.3 1996/12/08 15:15:55 niklas Exp $ */
+/* $NetBSD: read.c,v 1.7 1996/06/21 20:29:28 pk Exp $ */
/*-
* Copyright (c) 1993
@@ -65,6 +65,7 @@
* rights to redistribute these changes.
*/
+#include <sys/param.h>
#include "stand.h"
ssize_t
@@ -83,9 +84,10 @@ read(fd, dest, bcount)
if (f->f_flags & F_RAW) {
twiddle();
errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ,
- (daddr_t)0, bcount, dest, &resid);
+ btodb(f->f_offset), bcount, dest, &resid);
if (errno)
return (-1);
+ f->f_offset += resid;
return (resid);
}
resid = bcount;