From: Andrew Deason Date: Fri, 3 Sep 2010 20:20:10 +0000 (-0500) Subject: vos: Show after effects in dryrun mode X-Git-Tag: upstream/1.8.0_pre1^2~4865 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5705a46a75917cb34b4ea9161dde4ee43d0d4eb0;p=packages%2Fo%2Fopenafs.git vos: Show after effects in dryrun mode The dryrun mode of operation for 'vos syncvldb' and 'vos syncserv' does not currently show the "status after" portion of its output, so they don't really show what the commands will do. Change them so "status after" is shown for -dryrun when sync'ing servers or partitions, and count changes towards the count at the end. Change-Id: I6cc20c28a989925a1262570b286fdd7d290c0a9a Reviewed-on: http://gerrit.openafs.org/2666 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/volser/vsprocs.c b/src/volser/vsprocs.c index 006eafb3d..107ba2c2f 100644 --- a/src/volser/vsprocs.c +++ b/src/volser/vsprocs.c @@ -5971,8 +5971,6 @@ CheckVolume(volintInfo * volumeinfo, afs_uint32 aserver, afs_int32 apart, ERROR_EXIT(code); } } - if (modentry) - *modentry = modified; } else if (pass == 2) { code = ubik_VL_ReleaseLock(cstruct, 0, rwvolid, RWVOL, @@ -5982,7 +5980,11 @@ CheckVolume(volintInfo * volumeinfo, afs_uint32 aserver, afs_int32 apart, } } - if (verbose && doit) { + if (modified && modentry) { + *modentry = 1; + } + + if (verbose) { fprintf(STDOUT, "-- status after --\n"); if (modified) EnumerateEntry(&entry); @@ -6732,12 +6734,14 @@ CheckVldb(struct nvldbentry * entry, afs_int32 * modified) ERROR_EXIT(code); } } - if (modified) - *modified = 1; islocked = 0; } - if (verbose && doit) { + if (modified && modentry) { + *modified = 1; + } + + if (verbose) { fprintf(STDOUT, "-- status after --\n"); if (delentry) fprintf(STDOUT, "\n**entry deleted**\n");