diff --git a/lib/luks2/luks2_json_format.c b/lib/luks2/luks2_json_format.c index ac509169..ab8b4db3 100644 --- a/lib/luks2/luks2_json_format.c +++ b/lib/luks2/luks2_json_format.c @@ -97,7 +97,7 @@ int LUKS2_find_area_gap(struct crypt_device *cd, struct luks2_hdr *hdr, } if ((offset + length) > get_max_offset(hdr)) { - log_err(cd, _("No space for new keyslot.")); + log_dbg(cd, "Not enough space in header keyslot area."); return -EINVAL; } diff --git a/lib/luks2/luks2_keyslot_luks2.c b/lib/luks2/luks2_keyslot_luks2.c index 10f72378..db01780f 100644 --- a/lib/luks2/luks2_keyslot_luks2.c +++ b/lib/luks2/luks2_keyslot_luks2.c @@ -480,8 +480,10 @@ static int luks2_keyslot_alloc(struct crypt_device *cd, return -EINVAL; r = LUKS2_find_area_gap(cd, hdr, volume_key_len, &area_offset, &area_length); - if (r < 0) + if (r < 0) { + log_err(cd, _("No space for new keyslot.")); return r; + } jobj_keyslot = json_object_new_object(); json_object_object_add(jobj_keyslot, "type", json_object_new_string("luks2"));