From 6f2ba2c18a0f0c154f3b6696fec694a9179b055f Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 3 Sep 2010 15:20:10 -0500 Subject: [PATCH] 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 (cherry picked from commit 5705a46a75917cb34b4ea9161dde4ee43d0d4eb0) Reviewed-on: http://gerrit.openafs.org/2695 --- src/volser/vsprocs.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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"); -- 2.39.5