volinfo: fix volume aux totals output
authorMichael Meffie <mmeffie@sinenomine.net>
Sat, 21 May 2011 16:38:03 +0000 (12:38 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sun, 22 May 2011 14:00:13 +0000 (07:00 -0700)
Do not print the volumes aux totals prematurely when running
volinfo with the -headers flag on an namei fileserver. Instead
print the aux totals only once after the link table size is found.

Change-Id: I4538e2fc8978530fd2e8593e0b343a2497c7a764
Reviewed-on: http://gerrit.openafs.org/4694
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/vol/vol-info.c

index bfc7d44..db693db 100644 (file)
@@ -552,9 +552,6 @@ HandleVolume(struct DiskPartition64 *dp, char *name)
            if (!dsizeOnly && !saveinodes) {
                printf("\tLarge inode\t= %s (size = %d)\n",
                       PrintInode(NULL, header.largeVnodeIndex), (int)code);
-#ifndef AFS_NT40_ENV
-               printf("Total aux volume size = %d\n\n", (int)size);
-#endif
            }
 #ifdef AFS_NAMEI_ENV
            IH_INIT(ih, dp->device, header.parent, header.linkTable);
@@ -579,9 +576,9 @@ HandleVolume(struct DiskPartition64 *dp, char *name)
            if (!dsizeOnly && !saveinodes) {
                printf("\tLink inode\t= %s (size = %d)\n",
                       PrintInode(NULL, header.linkTable), (int)code);
-               printf("Total aux volume size = %d\n\n", (int)size);
            }
 #endif
+           printf("Total aux volume size = %d\n\n", (int)size);
            Vauxsize = size;
            Vauxsize_k = size / 1024;
        }