On 04/03/2018 06:08 AM, Kevin Wolf wrote: > The legacy command line interface gets the socket path from an option > called 'socket'. QAPI in contract uses SocketAddress, where the > corresponding option is called 'path'. > > Fix the gluster block driver to accept both 'socket' and 'path', with > 'path' being the preferred syntax. > > https://bugzilla.redhat.com/show_bug.cgi?id=1545155 > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/gluster.c | 21 +++++++++++++++++---- > 1 file changed, 17 insertions(+), 4 deletions(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> Should we also add a deprecation warning for 'socket' and update the deprecation documentation, so we can start the clock ticking on getting rid of maintaining the back-compat glue forever? > @@ -615,10 +620,18 @@ static int > qemu_gluster_parse_json(BlockdevOptionsGluster *gconf, > goto out; > } > > - ptr = qemu_opt_get(opts, GLUSTER_OPT_SOCKET); > + ptr = qemu_opt_get(opts, GLUSTER_OPT_PATH); > + if (!ptr) { > + ptr = qemu_opt_get(opts, GLUSTER_OPT_SOCKET); Here's where we'd warn, if we want to deprecate things. > + } else if (qemu_opt_get(opts, GLUSTER_OPT_SOCKET)) { > + error_setg(&local_err, > + "Conflicting parameters 'path' and 'socket'"); > + error_append_hint(&local_err, GERR_INDEX_HINT, i); > + goto out; > + } > if (!ptr) { -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature