When decrypting a given keyslot, all error cases except for one set up
an error and return the error code. The only exception is when we try to
read the area key: instead of setting up an error message, we directly
print it via grub_dprintf().
Convert the outlier to use grub_error() to allow more uniform handling
of errors.
Signed-off-by: Patrick Steinhardt <ps@kps.im>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
ret = grub_disk_read (disk, 0, k->area.offset, k->area.size, split_key);
if (ret)
{
- grub_dprintf ("luks2", "Read error: %s\n", grub_errmsg);
+ grub_error (GRUB_ERR_IO, "Read error: %s\n", grub_errmsg);
goto err;
}