From: Hani Benhabiles <kroosec@gmail.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>,
hutao@cn.fujitsu.com, qemu-devel@nongnu.org,
tangchen@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com,
aliguori@amazon.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v1 3/3] monitor: add del completion for peripheral device
Date: Mon, 29 Sep 2014 22:33:33 +0100 [thread overview]
Message-ID: <20140929213333.GA6902@Inspiron-3521> (raw)
In-Reply-To: <20140926132941.2af17a9f@redhat.com>
On Fri, Sep 26, 2014 at 01:29:41PM -0400, Luiz Capitulino wrote:
> On Fri, 26 Sep 2014 13:25:45 -0400
> Luiz Capitulino <lcapitulino@redhat.com> wrote:
>
> > On Thu, 18 Sep 2014 15:53:21 +0800
> > Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:
> >
> > > Add peripheral_device_del_completion() to let peripheral device del completion
> > > be possible.
> > >
> > > Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
> > > ---
> > > monitor.c | 24 ++++++++++++++++++++++++
> > > 1 file changed, 24 insertions(+)
> > >
> > > diff --git a/monitor.c b/monitor.c
> > > index 667efb7..c0e00e4 100644
> > > --- a/monitor.c
> > > +++ b/monitor.c
> > > @@ -4351,6 +4351,29 @@ static void device_del_bus_completion(ReadLineState *rs, BusState *bus,
> > > }
> > > }
> > >
> > > +static void peripheral_device_del_completion(ReadLineState *rs,
> > > + const char *str, size_t len)
> > > +{
> > > + Object *peripheral;
> > > + DeviceState *dev = NULL;
> > > + ObjectProperty *prop;
> > > +
> > > + peripheral = object_resolve_path("/machine/peripheral/", NULL);
> > > +
> > > + if (peripheral == NULL) {
> > > + return;
> > > + }
> > > +
> > > + QTAILQ_FOREACH(prop, &peripheral->properties, node) {
> > > + if (object_property_is_child(prop)) {
> > > + dev = DEVICE(object_property_get_opaque(prop, NULL));
> > > + if (dev->id && !strncmp(str, dev->id, len)) {
> > > + readline_add_completion(rs, dev->id);
> > > + }
> > > + }
> > > + }
> > > +}
> > > +
> > > void chardev_remove_completion(ReadLineState *rs, int nb_args, const char *str)
> > > {
> > > size_t len;
> > > @@ -4424,6 +4447,7 @@ void device_del_completion(ReadLineState *rs, int nb_args, const char *str)
> > > len = strlen(str);
> > > readline_set_completion_index(rs, len);
> > > device_del_bus_completion(rs, sysbus_get_default(), str, len);
> > > + peripheral_device_del_completion(rs, str, len);
> > > }
> >
> > The series intro email mentions device_del, but this is added to
> > chardev-remove. Is there a reason for this?
>
> Turns out this is not added to chardev_remove_completion(), looked too
> quickly. In any case, would be nice to have Hani's review.
Hi,
I'm wrestling with my ISP at the moment. Will get back to these as soon as
possible
Thanks.
>
> >
> > Hani, could you please review this series?
> >
> > >
> > > void object_del_completion(ReadLineState *rs, int nb_args, const char *str)
> >
>
next prev parent reply other threads:[~2014-09-29 21:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 7:53 [Qemu-devel] [PATCH v1 0/3] monitor: add peripheral device del completion support Zhu Guihua
2014-09-18 7:53 ` [Qemu-devel] [PATCH v1 1/3] qom: add function to get opaque property in ObjectProperty Zhu Guihua
2014-09-18 7:53 ` [Qemu-devel] [PATCH v1 2/3] qom: export object_property_is_child() Zhu Guihua
2014-09-26 9:31 ` Andreas Färber
2014-09-18 7:53 ` [Qemu-devel] [PATCH v1 3/3] monitor: add del completion for peripheral device Zhu Guihua
2014-09-26 9:29 ` Andreas Färber
2014-09-26 17:25 ` Luiz Capitulino
2014-09-26 17:29 ` Luiz Capitulino
2014-09-29 21:33 ` Hani Benhabiles [this message]
2014-09-26 2:01 ` [Qemu-devel] [PATCH v1 0/3] monitor: add peripheral device del completion support Zhu Guihua
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140929213333.GA6902@Inspiron-3521 \
--to=kroosec@gmail.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=hutao@cn.fujitsu.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tangchen@cn.fujitsu.com \
--cc=zhugh.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).