Module Name: src
Committed By: kre
Date: Thu Dec 3 08:25:57 UTC 2020
Modified Files:
src/sbin/dump: dump.h main.c
Log Message:
PR bin/55834
count blocks written in unsigned 64 bit counter
rather than signed int which overflows after 2^31-1
blocks (2TiB) after which neither the 5 minute
status updates or SIGINFO (^T) reports are issued
until the negative numbers increase past 0 and
wildly inaccurate reports would be written.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sbin/dump/dump.h
cvs rdiff -u -r1.77 -r1.78 src/sbin/dump/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/dump/dump.h
diff -u src/sbin/dump/dump.h:1.58 src/sbin/dump/dump.h:1.59
--- src/sbin/dump/dump.h:1.58 Sun Apr 5 15:25:39 2020
+++ src/sbin/dump/dump.h Thu Dec 3 08:25:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: dump.h,v 1.58 2020/04/05 15:25:39 joerg Exp $ */
+/* $NetBSD: dump.h,v 1.59 2020/12/03 08:25:57 kre Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -134,7 +134,7 @@ extern int unlimited; /* if set, write t
extern int density; /* density in 0.1" units */
extern int notify; /* notify operator flag */
extern int timestamp; /* timestamp messages */
-extern int blockswritten; /* number of blocks written on current tape */
+extern u_int64_t blockswritten; /* blocks written on current tape */
extern int tapeno; /* current tape number */
extern int is_ufs2;
Index: src/sbin/dump/main.c
diff -u src/sbin/dump/main.c:1.77 src/sbin/dump/main.c:1.78
--- src/sbin/dump/main.c:1.77 Sun Apr 5 15:25:39 2020
+++ src/sbin/dump/main.c Thu Dec 3 08:25:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.77 2020/04/05 15:25:39 joerg Exp $ */
+/* $NetBSD: main.c,v 1.78 2020/12/03 08:25:57 kre Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: main.c,v 1.77 2020/04/05 15:25:39 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.78 2020/12/03 08:25:57 kre Exp $");
#endif
#endif /* not lint */
@@ -108,7 +108,7 @@ int needswap;
int timestamp; /* print message timestamps */
int notify; /* notify operator flag */
-int blockswritten; /* number of blocks written on current tape */
+u_int64_t blockswritten; /* number of blocks written on current tape */
int tapeno; /* current tape number */
int density; /* density in bytes/0.1" */
int ntrec = NTREC; /* # tape blocks in each tape record */