mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 22:30:07 +01:00
Print blkid scan failure.
If old util-linux is used, blkid scan can fail because disk is already locked for OPAL. Do the same for other internal blkid issue. Also add some debug messages to be clear what's going on.
This commit is contained in:
@@ -1329,8 +1329,11 @@ static int check_broken_luks_signature(const char *device)
|
||||
size_t count;
|
||||
|
||||
r = tools_detect_signatures(device, PRB_ONLY_LUKS, &count, ARG_SET(OPT_BATCH_MODE_ID));
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
if (r == -EIO)
|
||||
log_err(_("Blkid scan failed for %s."), device);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (count) {
|
||||
log_err(_("Device %s contains broken LUKS metadata. Aborting operation."), device);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user