Fix printing for bytes read > 4G.

Reviewed by:	bde
This commit is contained in:
Satoshi Asami 1998-02-11 02:23:31 +00:00
parent d131a704ed
commit 2f719e7069
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33234
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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));
}