qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] HMP: Add equivalent to x-block


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] HMP: Add equivalent to x-blockdev-change
Date: Thu, 17 Dec 2015 16:48:28 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

* Eric Blake (address@hidden) wrote:
> On 12/17/2015 03:47 AM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> > 
> > x-blockdev-change has no HMP equivalent, so add x_block_change.
> > 
> > Example useages are:
> 
> s/useages/usages/

Yep.

> > 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 <address@hidden>
> > ---
> 
> > +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/ ?

Yep, can do.

> 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.

Oh I was assuming if we wanted to make a 'change' we'd add a -c.

> So I'm fine with fixing the minor issues mentioned above, and adding:
> 
> Reviewed-by: Eric Blake <address@hidden>

Thanks.

Dave

> 
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
> 


--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]