cleanup: return error type in encryptDevice()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 15:04:59 +01:00 committed by mergify[bot]
parent d6fb8f302d
commit 4dde3fc9e0

View File

@ -838,7 +838,7 @@ func encryptDevice(ctx context.Context, rbdVol *rbdVolume, devicePath string) er
}
if err = util.EncryptVolume(ctx, devicePath, passphrase); err != nil {
err = fmt.Errorf("failed to encrypt volume %s: %v", rbdVol, err)
err = fmt.Errorf("failed to encrypt volume %s: %w", rbdVol, err)
util.ErrorLog(ctx, err.Error())
return err
}