diff options
author | green <green@FreeBSD.org> | 1999-09-16 19:50:59 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-09-16 19:50:59 +0000 |
commit | a12ece1af8e8a375973b5cd4ea60516c4e61a819 (patch) | |
tree | cf94071b11c33e7d8ffb6c9317614d708c5d586f /bin/dd/position.c | |
parent | f051cabc3624134f50f0a18014e1430c314c8bde (diff) | |
download | FreeBSD-src-a12ece1af8e8a375973b5cd4ea60516c4e61a819.zip FreeBSD-src-a12ece1af8e8a375973b5cd4ea60516c4e61a819.tar.gz |
Make count=0 set cpy_cnt to -1, which is slight overloading, but makes
what I was trying to do work much better (ie at all. I could have sworn
it was working...) Fix a SEEK_SET to be SEEK_CUR, and make Bruce's
lseek() test work correctly.
Diffstat (limited to 'bin/dd/position.c')
-rw-r--r-- | bin/dd/position.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/dd/position.c b/bin/dd/position.c index e6774a5..9d3d0d8 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -132,7 +132,7 @@ pos_out() */ if (!(out.flags & ISTAPE)) { errno = 0; - if (lseek(out.fd, out.offset * out.dbsz, SEEK_SET) == -1 && + if (lseek(out.fd, out.offset * out.dbsz, SEEK_CUR) == -1 && errno != 0) err(1, "%s", out.name); return; |