" got %jX, expected %jX",
blkid_probe_get_probername(pr),
csum, expected));
-
- if (!(chn->flags & BLKID_SUBLKS_BADCSUM))
- return 0;
+ /*
+ * Accept bad checksum if BLKID_SUBLKS_BADCSUM flags is set
+ */
+ if (chn->driver->id == BLKID_CHAIN_SUBLKS
+ && (chn->flags & BLKID_SUBLKS_BADCSUM)) {
+ blkid_probe_set_value(pr, "SBBADCSUM", (unsigned char *) "1", 2);
+ goto accept;
+ }
+ return 0; /* bad checksum */
}
- return 1; /* checksum accepted */
+accept:
+ return 1;
}
/**