aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/blockdev.c b/blockdev.c
index 02cd69bc21..796beaed94 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -44,7 +44,6 @@
#include "qapi-visit.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qobject-output-visitor.h"
-#include "qapi/util.h"
#include "sysemu/sysemu.h"
#include "block/block_int.h"
#include "qmp-commands.h"
@@ -438,9 +437,8 @@ static void extract_common_blockdev_options(QemuOpts *opts, int *bdrv_flags,
if (detect_zeroes) {
*detect_zeroes =
- qapi_enum_parse(BlockdevDetectZeroesOptions_lookup,
+ qapi_enum_parse(&BlockdevDetectZeroesOptions_lookup,
qemu_opt_get(opts, "detect-zeroes"),
- BLOCKDEV_DETECT_ZEROES_OPTIONS__MAX,
BLOCKDEV_DETECT_ZEROES_OPTIONS_OFF,
&local_error);
if (local_error) {
@@ -1468,8 +1466,8 @@ static int action_check_completion_mode(BlkActionState *s, Error **errp)
error_setg(errp,
"Action '%s' does not support Transaction property "
"completion-mode = %s",
- TransactionActionKind_lookup[s->action->type],
- ActionCompletionMode_lookup[s->txn_props->completion_mode]);
+ TransactionActionKind_str(s->action->type),
+ ActionCompletionMode_str(s->txn_props->completion_mode));
return -1;
}
return 0;