diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index c875013ec997..dd273ea71685 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -52,6 +52,7 @@ static const char rcsid[] = #include #include #include +#include #include "dump.h" diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 270ea81dff58..b18fc7c202d0 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -59,10 +59,12 @@ static const char rcsid[] = #include #include #include +#include #include #include #include #include +#include #include #include "dump.h" @@ -102,7 +104,6 @@ main(int argc, char *argv[]) int just_estimate = 0; ino_t maxino; char *tmsg; - time_t t; spcl.c_date = _time_to_time64(time(NULL)); @@ -359,7 +360,7 @@ main(int argc, char *argv[]) dev_bsize = sblock->fs_fsize / fsbtodb(sblock, 1); dev_bshift = ffs(dev_bsize) - 1; if (dev_bsize != (1 << dev_bshift)) - quit("dev_bsize (%d) is not a power of 2", dev_bsize); + quit("dev_bsize (%ld) is not a power of 2", dev_bsize); tp_bshift = ffs(TP_BSIZE) - 1; if (TP_BSIZE != (1 << tp_bshift)) quit("TP_BSIZE (%d) is not a power of 2", TP_BSIZE); @@ -492,19 +493,19 @@ main(int argc, char *argv[]) for (i = 0; i < ntrec; i++) writeheader(maxino - 1); if (pipeout) - msg("DUMP: %qd tape blocks\n", spcl.c_tapea); + msg("DUMP: %jd tape blocks\n", (intmax_t)spcl.c_tapea); else - msg("DUMP: %qd tape blocks on %d volume%s\n", - spcl.c_tapea, spcl.c_volume, + msg("DUMP: %jd tape blocks on %d volume%s\n", + (intmax_t)spcl.c_tapea, spcl.c_volume, (spcl.c_volume == 1) ? "" : "s"); /* report dump performance, avoid division through zero */ if (tend_writing - tstart_writing == 0) msg("finished in less than a second\n"); else - msg("finished in %d seconds, throughput %qd KBytes/sec\n", - tend_writing - tstart_writing, - spcl.c_tapea / (tend_writing - tstart_writing)); + msg("finished in %d seconds, throughput %jd KBytes/sec\n", + tend_writing - tstart_writing, (intmax_t)(spcl.c_tapea / + (tend_writing - tstart_writing))); putdumptime(); trewind(); diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index 1665e760a8e9..aa65b47c0148 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -781,6 +781,7 @@ doslave(int cmd, int slave_number) eot_count = 0; size = 0; + wrote = 0; while (eot_count < 10 && size < writesize) { #ifdef RDUMP if (host) diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 5480663f320e..bd01ecb36047 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -49,11 +49,13 @@ static const char rcsid[] = #include #include -#include #include -#include -#include +#include +#include #include +#include +#include +#include #include "dump.h" @@ -388,8 +390,6 @@ searchdir( void dumpino(union dinode *dp, ino_t ino) { - struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; int ind_level, cnt; off_t size; char buf[TP_BSIZE]; @@ -705,11 +705,11 @@ bread(ufs2_daddr_t blkno, char *buf, int size) goto loop; } if (cnt == -1) - msg("read error from %s: %s: [block %qd]: count=%d\n", - disk, strerror(errno), blkno, size); + msg("read error from %s: %s: [block %jd]: count=%d\n", + disk, strerror(errno), (intmax_t)blkno, size); else - msg("short read error from %s: [block %qd]: count=%d, got=%d\n", - disk, blkno, size, cnt); + msg("short read error from %s: [block %jd]: count=%d, got=%d\n", + disk, (intmax_t)blkno, size, cnt); if (++breaderrors > BREADEMAX) { msg("More than %d block read errors from %s\n", BREADEMAX, disk); @@ -730,11 +730,11 @@ bread(ufs2_daddr_t blkno, char *buf, int size) ((off_t)blkno << dev_bshift))) == dev_bsize) continue; if (cnt == -1) { - msg("read error from %s: %s: [sector %qd]: count=%d\n", - disk, strerror(errno), blkno, dev_bsize); + msg("read error from %s: %s: [sector %jd]: count=%ld\n", + disk, strerror(errno), (intmax_t)blkno, dev_bsize); continue; } - msg("short read error from %s: [sector %qd]: count=%d, got=%d\n", - disk, blkno, dev_bsize, cnt); + msg("short read from %s: [sector %jd]: count=%ld, got=%d\n", + disk, (intmax_t)blkno, dev_bsize, cnt); } }