On 12/17/2015 03:47 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > x-blockdev-change has no HMP equivalent, so add x_block_change. > > Example useages are:
s/useages/usages/ > x_block_change foo -a bah > to add the node bah to the parent foo > > x_block_change foo -d bah > to delete the node bah from the parent foo > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > +void hmp_block_change(Monitor *mon, const QDict *qdict) > +{ > + const char *parent = qdict_get_str(qdict, "parent"); > + const char *child = qdict_get_str(qdict, "child"); > + bool add = qdict_get_try_bool(qdict, "add", false); > + bool del = qdict_get_try_bool(qdict, "del", false); > + Error *err = NULL; > + > + if (add == del) { > + error_setg(&err, "One of -a or -d must be set"); Maybe s/One/Exactly one/ ? Limited in that we may eventually want to allow both add and delete at the same time; but HMP does not have hard-and-fast back-compat rules. So I'm fine with fixing the minor issues mentioned above, and adding: Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature