[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] monitor: Add device_del id argument complet
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] monitor: Add device_del id argument completion. |
Date: |
Tue, 11 Feb 2014 13:35:44 -0500 |
On Thu, 6 Feb 2014 23:30:10 +0100
Hani Benhabiles <address@hidden> wrote:
> ---
> monitor.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
Your S-o-B is missing in all patches. Can reply to them adding it?
>
> diff --git a/monitor.c b/monitor.c
> index b1ea262..f8c4cae 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4254,6 +4254,25 @@ static const char *next_arg_type(const char *typestr)
> return (p != NULL ? ++p : typestr);
> }
>
> +static void device_del_completion(ReadLineState *rs, BusState *bus,
> + const char *str, size_t len)
> +{
> + BusChild *kid;
> +
> + QTAILQ_FOREACH(kid, &bus->children, sibling) {
> + DeviceState *dev = kid->child;
> + BusState *dev_child;
> +
> + if (dev->id && !strncmp(str, dev->id, len)) {
> + readline_add_completion(rs, dev->id);
> + }
> +
> + QLIST_FOREACH(dev_child, &dev->child_bus, sibling) {
> + device_del_completion(rs, dev_child, str, len);
> + }
> + }
> +}
> +
> static void monitor_find_completion_by_table(Monitor *mon,
> const mon_cmd_t *cmd_table,
> char **args,
> @@ -4330,6 +4349,10 @@ static void monitor_find_completion_by_table(Monitor
> *mon,
> } else if (!strcmp(cmd->name, "help|?")) {
> monitor_find_completion_by_table(mon, cmd_table,
> &args[1], nb_args - 1);
> + } else if (!strcmp(cmd->name, "device_del") && nb_args == 2) {
> + size_t len = strlen(str);
> + readline_set_completion_index(mon->rs, len);
> + device_del_completion(mon->rs, sysbus_get_default(), str,
> len);
> }
> break;
> default:
- [Qemu-devel] [PATCH 0/4] monitor: Add argument completion for multiple commands., Hani Benhabiles, 2014/02/06
- [Qemu-devel] [PATCH 1/4] monitor: Add device_del id argument completion., Hani Benhabiles, 2014/02/06
- Re: [Qemu-devel] [PATCH 1/4] monitor: Add device_del id argument completion.,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 3/4] monitor: Add object_del id argument completion., Hani Benhabiles, 2014/02/06
- [Qemu-devel] [PATCH 2/4] monitor: Add device_add device argument completion., Hani Benhabiles, 2014/02/06
- [Qemu-devel] [PATCH 4/4] monitor: Add object_add class argument completion., Hani Benhabiles, 2014/02/06
- Re: [Qemu-devel] [PATCH 0/4] monitor: Add argument completion for multiple commands., Luiz Capitulino, 2014/02/11