From 593f22a9a86ce973c631347e213859ec80950b9f Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Wed, 4 Oct 2023 16:13:04 +0200 Subject: [PATCH] Fix empty device name in reencryption prompt message. While resuming LUKS2 reencryption operation for device identified by active mapping (--active-name) the prompt about ongoing operation did not use correct variable to get device name in the message. --- src/utils_reencrypt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_reencrypt.c b/src/utils_reencrypt.c index 9981ea55..b283402d 100644 --- a/src/utils_reencrypt.c +++ b/src/utils_reencrypt.c @@ -306,7 +306,7 @@ static int reencrypt_luks2_load(struct crypt_device *cd, const char *data_device if (!ARG_SET(OPT_BATCH_MODE_ID) && !ARG_SET(OPT_RESUME_ONLY_ID)) { r = asprintf(&msg, _("Device %s is already in LUKS2 reencryption. " "Do you wish to resume previously initialised operation?"), - crypt_get_metadata_device_name(cd) ?: data_device); + crypt_get_metadata_device_name(cd) ?: crypt_get_device_name(cd)); if (r < 0) { r = -ENOMEM; goto out;