diff options
Diffstat (limited to 'bin/dd/position.c')
-rw-r--r-- | bin/dd/position.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/bin/dd/position.c b/bin/dd/position.c index 21a100cd3b24..c092b5c5f8db 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -33,14 +33,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)position.c 8.3 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <sys/mtio.h> @@ -191,9 +183,11 @@ pos_out(void) /* Read it. */ for (cnt = 0; cnt < out.offset; ++cnt) { - if ((n = read(out.fd, out.db, out.dbsz)) > 0) + before_io(); + n = read(out.fd, out.db, out.dbsz); + after_io(); + if (n > 0) continue; - if (n == -1) err(1, "%s", out.name); @@ -208,7 +202,9 @@ pos_out(void) err(1, "%s", out.name); while (cnt++ < out.offset) { + before_io(); n = write(out.fd, out.db, out.dbsz); + after_io(); if (n == -1) err(1, "%s", out.name); if (n != out.dbsz) |