mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 05:10:03 +01:00
Make crypt_load quiet if metadata is not detected.
Ths will allow automatic scan of known formats. Errors are printed only if something is wrong with already detected metadata. This change means that it is responsibility of the caller to print an error message if needed. Also fix some places without a message. Fixes: #642
This commit is contained in:
@@ -51,7 +51,7 @@ static int INTEGRITY_read_superblock(struct crypt_device *cd,
|
||||
if (read_lseek_blockwise(devfd, device_block_size(cd, device),
|
||||
device_alignment(device), sb, sizeof(*sb), offset) != sizeof(*sb) ||
|
||||
memcmp(sb->magic, SB_MAGIC, sizeof(sb->magic))) {
|
||||
log_err(cd, _("No kernel dm-integrity metadata detected on %s."), device_path(device));
|
||||
log_dbg(cd, "No kernel dm-integrity metadata detected on %s.", device_path(device));
|
||||
r = -EINVAL;
|
||||
} else if (sb->version < SB_VERSION_1 || sb->version > SB_VERSION_5) {
|
||||
log_err(cd, _("Incompatible kernel dm-integrity metadata (version %u) detected on %s."),
|
||||
|
||||
Reference in New Issue
Block a user