summaryrefslogtreecommitdiff
path: root/crypto/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/block.c')
-rw-r--r--crypto/block.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/block.c b/crypto/block.c
index be823eebeb..64c8420425 100644
--- a/crypto/block.c
+++ b/crypto/block.c
@@ -59,7 +59,8 @@ QCryptoBlock *qcrypto_block_open(QCryptoBlockOpenOptions *options,
if (options->format >= G_N_ELEMENTS(qcrypto_block_drivers) ||
!qcrypto_block_drivers[options->format]) {
- error_setg(errp, "Unsupported block driver %d", options->format);
+ error_setg(errp, "Unsupported block driver %s",
+ QCryptoBlockFormat_lookup[options->format]);
g_free(block);
return NULL;
}
@@ -88,7 +89,8 @@ QCryptoBlock *qcrypto_block_create(QCryptoBlockCreateOptions *options,
if (options->format >= G_N_ELEMENTS(qcrypto_block_drivers) ||
!qcrypto_block_drivers[options->format]) {
- error_setg(errp, "Unsupported block driver %d", options->format);
+ error_setg(errp, "Unsupported block driver %s",
+ QCryptoBlockFormat_lookup[options->format]);
g_free(block);
return NULL;
}