diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 053b2c87..8e0eb736 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -1636,8 +1636,12 @@ int luksFormat(struct crypt_device **r_cd, char **r_password, size_t *r_password tools_keyslot_msg(r, CREATED); if (ARG_SET(OPT_INTEGRITY_ID) && !ARG_SET(OPT_INTEGRITY_NO_WIPE_ID) && - strcmp_or_null(params2.integrity, "none")) + strcmp_or_null(params2.integrity, "none")) { r = _wipe_data_device(cd); + /* Interrupted wipe should not fail luksFormat action */ + if (r == -EINTR) + r = 0; + } out: crypt_safe_free(key); diff --git a/src/integritysetup.c b/src/integritysetup.c index c1ad4537..6545f036 100644 --- a/src/integritysetup.c +++ b/src/integritysetup.c @@ -217,8 +217,12 @@ static int action_format(void) log_std(_("Formatted with tag size %u, internal integrity %s.\n"), params2.tag_size, params2.integrity); - if (!ARG_SET(OPT_NO_WIPE_ID)) + if (!ARG_SET(OPT_NO_WIPE_ID)) { r = _wipe_data_device(cd, integrity_key); + /* Interrupted wipe should not fail format action */ + if (r == -EINTR) + r = 0; + } out: crypt_safe_free(integrity_key); crypt_safe_free(CONST_CAST(void*)params.journal_integrity_key);