On Fri 23 Jun 2017 02:46:58 PM CEST, Manos Pitsidianakis wrote: > BlockDriverState *bdrv_new_open_driver(BlockDriver *drv, const char > *node_name, > - int flags, Error **errp) > + int flags, QDict *options, Error > **errp) > { > BlockDriverState *bs; > int ret; > > bs = bdrv_new(); > bs->open_flags = flags; > - bs->explicit_options = qdict_new(); > - bs->options = qdict_new(); > + if (options) { > + bs->explicit_options = qdict_clone_shallow(options); > + bs->options = qdict_clone_shallow(options); > + } else { > + bs->explicit_options = qdict_new(); > + bs->options = qdict_new(); > + } > bs->opaque = NULL; > > update_options_from_flags(bs->options, flags); > > - ret = bdrv_open_driver(bs, drv, node_name, bs->options, flags, errp); > + ret = bdrv_open_driver(bs, drv, node_name, options, flags, errp);
Why this last change? In the default case you're now passing NULL instead of the QDict created with qdict_new(). Berto