diff options
Diffstat (limited to 'block/file-posix.c')
-rw-r--r-- | block/file-posix.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/block/file-posix.c b/block/file-posix.c index cb3bfce147..97e8a92e23 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -439,7 +439,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, ? BLOCKDEV_AIO_OPTIONS_NATIVE : BLOCKDEV_AIO_OPTIONS_THREADS; aio = qapi_enum_parse(BlockdevAioOptions_lookup, qemu_opt_get(opts, "aio"), - BLOCKDEV_AIO_OPTIONS__MAX, aio_default, &local_err); + aio_default, &local_err); if (local_err) { error_propagate(errp, local_err); ret = -EINVAL; @@ -448,7 +448,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, s->use_linux_aio = (aio == BLOCKDEV_AIO_OPTIONS_NATIVE); locking = qapi_enum_parse(OnOffAuto_lookup, qemu_opt_get(opts, "locking"), - ON_OFF_AUTO__MAX, ON_OFF_AUTO_AUTO, &local_err); + ON_OFF_AUTO_AUTO, &local_err); if (local_err) { error_propagate(errp, local_err); ret = -EINVAL; @@ -1975,8 +1975,7 @@ static int raw_create(const char *filename, QemuOpts *opts, Error **errp) nocow = qemu_opt_get_bool(opts, BLOCK_OPT_NOCOW, false); buf = qemu_opt_get_del(opts, BLOCK_OPT_PREALLOC); prealloc = qapi_enum_parse(PreallocMode_lookup, buf, - PREALLOC_MODE__MAX, PREALLOC_MODE_OFF, - &local_err); + PREALLOC_MODE_OFF, &local_err); g_free(buf); if (local_err) { error_propagate(errp, local_err); |