aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1998-02-11 02:23:31 +0000
committerSatoshi Asami <asami@FreeBSD.org>1998-02-11 02:23:31 +0000
commit2f719e70698c243b68d2ee74ae0a43db251bcd55 (patch)
tree6bd27362f97dc91624f90a19210fd21bd4145092
parentd131a704edd0ca61357f628026006e8fafc8aa66 (diff)
downloadsrc-2f719e70698c243b68d2ee74ae0a43db251bcd55.tar.gz
src-2f719e70698c243b68d2ee74ae0a43db251bcd55.zip
Fix printing for bytes read > 4G.
Reviewed by: bde
Notes
Notes: svn path=/head/; revision=33234
-rw-r--r--bin/dd/dd.h4
-rw-r--r--bin/dd/misc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/dd/dd.h b/bin/dd/dd.h
index 477f444d153e..58a156868c52 100644
--- a/bin/dd/dd.h
+++ b/bin/dd/dd.h
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)dd.h 8.3 (Berkeley) 4/2/94
- * $Id: dd.h,v 1.6 1997/02/22 14:02:45 peter Exp $
+ * $Id: dd.h,v 1.7 1997/10/11 20:09:05 joerg Exp $
*/
/* Input/output stream state. */
@@ -69,7 +69,7 @@ typedef struct {
u_long out_part; /* # of partial output blocks */
u_long trunc; /* # of truncated records */
u_long swab; /* # of odd-length swab blocks */
- u_long bytes; /* # of bytes written */
+ u_int64_t bytes; /* # of bytes written */
double start; /* start time of dd */
} STAT;
diff --git a/bin/dd/misc.c b/bin/dd/misc.c
index d75fd344e986..72701504fb05 100644
--- a/bin/dd/misc.c
+++ b/bin/dd/misc.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: misc.c,v 1.9 1997/10/09 10:50:54 eivind Exp $
+ * $Id: misc.c,v 1.10 1997/12/15 20:37:43 eivind Exp $
*/
#ifndef lint
@@ -82,7 +82,7 @@ summary()
(void)write(STDERR_FILENO, buf, strlen(buf));
}
(void)snprintf(buf, sizeof(buf),
- "%u bytes transferred in %.6f secs (%.0f bytes/sec)\n",
+ "%qu bytes transferred in %.6f secs (%.0f bytes/sec)\n",
st.bytes, secs, st.bytes / secs);
(void)write(STDERR_FILENO, buf, strlen(buf));
}