On Tue 22 Aug 2017 03:22:12 PM CEST, Marc-André Lureau wrote: > @@ -925,7 +908,13 @@ static int quorum_open(BlockDriverState *bs, QDict > *options, int flags, > goto exit; > } > > - ret = parse_read_pattern(qemu_opt_get(opts, QUORUM_OPT_READ_PATTERN)); > + if (!qemu_opt_get(opts, QUORUM_OPT_READ_PATTERN)) { > + ret = QUORUM_READ_PATTERN_QUORUM; > + } else { > + ret = qapi_enum_parse(QuorumReadPattern_lookup, > + qemu_opt_get(opts, QUORUM_OPT_READ_PATTERN), > + QUORUM_READ_PATTERN__MAX, -EINVAL, NULL); > + }
I don't like so much that you call qemu_opt_get() twice with the same parameters, but else the change makes sense. Berto