]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volinfo: fix false good magic line
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 7 Jun 2011 16:37:40 +0000 (12:37 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 13 Aug 2014 18:19:05 +0000 (14:19 -0400)
Fix false report of good magic/version numbers in volume
header file.

Reviewed-on: http://gerrit.openafs.org/4817
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 36f6eed2b458995ab973102acf74375bf0a66931)

Change-Id: Id5972430ae8e2fe374a854c3c33d2837aac48185
Reviewed-on: http://gerrit.openafs.org/11260
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/vol-info.c

index 8ee82735d3040d659d9bdf00a2eff112bd1b0d5d..0723f00da34bad70dab5678992d3a5d4d58cf12b 100644 (file)
@@ -324,11 +324,10 @@ ReadHdr1(IHandle_t * ih, char *to, int size, u_int magic, u_int version)
                    "%s: Write failed for inode %s; header left in damaged state\n",
                    progname, PrintInode(NULL, ih->ih_ino));
        }
-    } else {
-       if (DumpInfo) {
-           printf("Inode %s: Good magic %x and version %x\n",
-                  PrintInode(NULL, ih->ih_ino), magic, version);
-       }
+    }
+    if (!bad && DumpInfo) {
+       printf("Inode %s: Good magic %x and version %x\n",
+              PrintInode(NULL, ih->ih_ino), magic, version);
     }
     return 0;
 }