]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vos: Show after effects in dryrun mode
authorAndrew Deason <adeason@sinenomine.net>
Fri, 3 Sep 2010 20:20:10 +0000 (15:20 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Sep 2010 18:47:44 +0000 (11:47 -0700)
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 <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5705a46a75917cb34b4ea9161dde4ee43d0d4eb0)
Reviewed-on: http://gerrit.openafs.org/2695

src/volser/vsprocs.c

index 006eafb3daeb5d62a0aba252d3e2bad2fd253dab..107ba2c2f2036eb26b8d9a202de6a45632c8598b 100644 (file)
@@ -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");