From 956756f2bece84f31bc9647c0939ce2d283d6312 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Mon, 8 Mar 2004 14:04:02 +0000 Subject: [PATCH] Fixed -F to be run even if -M/-f is in use. --- CHANGES | 7 ++++++- dump/tape.c | 6 +++--- dump/traverse.c | 10 +++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index fa664c4..86910e4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.242 2004/03/01 15:38:10 stelian Exp $ +$Id: CHANGES,v 1.243 2004/03/08 14:04:02 stelian Exp $ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????) ======================================================================= @@ -29,6 +29,11 @@ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????) 7. Another try at making size estimates better again. +8. Put back the inconditional running of the end-of-tape + script which was changed in 0.434 to be run only when -M + or multiple -f were NOT specified. Some users rely on this + feature even when it is combined with -M/-f. + Changes between versions 0.4b34 and 0.4b35 (released December 21, 2003) ======================================================================= diff --git a/dump/tape.c b/dump/tape.c index b44f9e0..54f1178 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.81 2004/03/01 10:52:53 stelian Exp $"; + "$Id: tape.c,v 1.82 2004/03/08 14:04:04 stelian Exp $"; #endif /* not lint */ #include @@ -573,8 +573,6 @@ close_rewind(void) { int eot_code = 1; (void)trewind(); - if (nexttape || Mflag) - return; if (eot_script) { msg("Launching %s\n", eot_script); eot_code = system_command(eot_script, tape, tapeno); @@ -585,6 +583,8 @@ close_rewind(void) } if (eot_code == 0) return; + if (nexttape || Mflag) + return; if (!nogripe) { msg("Change Volumes: Mount volume #%d\n", tapeno+1); broadcast("CHANGE DUMP VOLUMES!\7\7\n"); diff --git a/dump/traverse.c b/dump/traverse.c index fb868db..051a226 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.57 2004/03/01 15:38:13 stelian Exp $"; + "$Id: traverse.c,v 1.58 2004/03/08 14:04:04 stelian Exp $"; #endif /* not lint */ #include @@ -208,6 +208,14 @@ blockest(struct dinode const *dp) if (blkest > sizeest) blkest = sizeest; #ifdef __linux__ + if ((dp->di_mode & IFMT) == IFDIR) { + /* + * for directories, assume only half of space is filled + * with entries. + */ + blkest = blkest / 2; + sizeest = sizeest / 2; + } if (i_size > (u_quad_t)fs->blocksize * NDADDR) { /* calculate the number of indirect blocks on the dump tape */ blkest += -- 2.39.5