Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sbin/dump Pull up following revision(s) (requested by bou...
details: https://anonhg.NetBSD.org/src/rev/ef574504b606
branches: netbsd-6
changeset: 777039:ef574504b606
user: snj <snj%NetBSD.org@localhost>
date: Tue Mar 08 10:05:43 2016 +0000
description:
Pull up following revision(s) (requested by bouyer in ticket #1332):
sbin/dump/main.c: revision 1.73
sbin/dump/tape.c: revision 1.54
Consistently use iswap64() and 64bit intermediate variable, as well as
64bit formats for c_tapea. Fixes tape useage report for large filesystems.
diffstat:
sbin/dump/main.c | 10 +++++-----
sbin/dump/tape.c | 17 +++++++++--------
2 files changed, 14 insertions(+), 13 deletions(-)
diffs (92 lines):
diff -r 75f31064235b -r ef574504b606 sbin/dump/main.c
--- a/sbin/dump/main.c Tue Mar 08 10:03:57 2016 +0000
+++ b/sbin/dump/main.c Tue Mar 08 10:05:43 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.66.8.1 2016/03/08 10:03:57 snj Exp $ */
+/* $NetBSD: main.c,v 1.66.8.2 2016/03/08 10:05:43 snj Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: main.c,v 1.66.8.1 2016/03/08 10:03:57 snj Exp $");
+__RCSID("$NetBSD: main.c,v 1.66.8.2 2016/03/08 10:05:43 snj Exp $");
#endif
#endif /* not lint */
@@ -633,10 +633,10 @@
for (i = 0; i < ntrec; i++)
writeheader(maxino - 1);
if (pipeout)
- msg("%d tape blocks\n",iswap32(spcl.c_tapea));
+ msg("%lld tape blocks\n",(long long)iswap64(spcl.c_tapea));
else
- msg("%d tape blocks on %d volume%s\n",
- iswap32(spcl.c_tapea), iswap32(spcl.c_volume),
+ msg("%lld tape blocks on %d volume%s\n",
+ (long long)iswap64(spcl.c_tapea), iswap32(spcl.c_volume),
(iswap32(spcl.c_volume) == 1) ? "" : "s");
tnow = do_stats();
date = iswap32(spcl.c_date);
diff -r 75f31064235b -r ef574504b606 sbin/dump/tape.c
--- a/sbin/dump/tape.c Tue Mar 08 10:03:57 2016 +0000
+++ b/sbin/dump/tape.c Tue Mar 08 10:05:43 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $ */
+/* $NetBSD: tape.c,v 1.50.4.1 2016/03/08 10:05:43 snj Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $");
+__RCSID("$NetBSD: tape.c,v 1.50.4.1 2016/03/08 10:05:43 snj Exp $");
#endif
#endif /* not lint */
@@ -336,7 +336,7 @@
if (spcl.c_addr[i] != 0)
blks++;
}
- slp->count = lastspclrec + blks + 1 - iswap32(spcl.c_tapea);
+ slp->count = lastspclrec + blks + 1 - iswap64(spcl.c_tapea);
slp->tapea = iswap64(spcl.c_tapea);
slp->firstrec = lastfirstrec + ntrec;
slp->inode = curino;
@@ -460,7 +460,8 @@
{
struct req *p, *q, *prev;
struct slave *tslp;
- int i, size, savedtapea, got;
+ int i, size, got;
+ int64_t savedtapea;
union u_spcl *ntb, *otb;
tslp = &slaves[SLAVES];
ntb = (union u_spcl *)tslp->tblock[1];
@@ -501,10 +502,10 @@
q->count = 1;
trecno = 0;
nextblock = tslp->tblock;
- savedtapea = iswap32(spcl.c_tapea);
- spcl.c_tapea = iswap32(slp->tapea);
+ savedtapea = iswap64(spcl.c_tapea);
+ spcl.c_tapea = iswap64(slp->tapea);
startnewtape(0);
- spcl.c_tapea = iswap32(savedtapea);
+ spcl.c_tapea = iswap64(savedtapea);
lastspclrec = savedtapea - 1;
}
size = (char *)ntb - (char *)q;
@@ -582,7 +583,7 @@
interrupt_save = signal(SIGINT, SIG_IGN);
parentpid = getpid();
- tapea_volume = iswap32(spcl.c_tapea);
+ tapea_volume = iswap64(spcl.c_tapea);
(void)time(&tstart_volume);
restore_check_point:
Home |
Main Index |
Thread Index |
Old Index