Add error message for failed in-use auto-detect.

When reencrypting image files cryptsetup is unable to
detect reliably if image file is in use or not.

User must decide it explictly. Add error message that
references --force-offline-reencrypt to solve the issue
in non interactive mode.

(It will be replaced with early detection in before 2.5.0 final
release).
This commit is contained in:
Ondrej Kozina
2022-07-13 12:29:17 +02:00
committed by Milan Broz
parent aa126ac10a
commit c413434715

View File

@@ -137,6 +137,10 @@ static int get_active_device_name(struct crypt_device *cd,
return -ENOMEM;
r = noDialog(msg, _("Operation aborted.\n")) ? 0 : -EINVAL;
free(msg);
} else {
/* FIXME: This is temporary message to be replaced in before final relase. */
log_err("Unable to decide if device %s is activated or not.\n"
"Use --force-offline-reencrypt to bypass the check and run in offline mode (dangerous!).", data_device);
}
} else {
*r_active_name = NULL;