]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
bcacheadm: only fail csum check when -f is passed
authorJacob Malevich <jam@daterainc.com>
Wed, 17 Dec 2014 20:10:47 +0000 (12:10 -0800)
committerRaghu Krishnamurthy <rk@daterainc.com>
Wed, 31 Dec 2014 23:17:12 +0000 (15:17 -0800)
Change-Id: I710f2b59940414830d08c7d018b53b84c6cbde05
Signed-off-by: Jacob Malevich <jam@daterainc.com>
bcache.c

index f6fcb24c1f1e4fa52a7ac343048c00e41f5632ac..7dc08bfee8e95154178f13855fe8f1f3686dd74d 100644 (file)
--- a/bcache.c
+++ b/bcache.c
@@ -755,7 +755,7 @@ static void show_super_common(struct cache_sb *sb, bool force_csum)
                printf(" [match]\n");
        } else {
                printf(" [expected %" PRIX64 "]\n", expected_csum);
-               if (!force_csum) {
+               if (force_csum) {
                        fprintf(stderr, "Corrupt superblock (bad csum)\n");
                        exit(2);
                }