qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] hmp: Remove migration capabilities from "inf


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v2] hmp: Remove migration capabilities from "info migrate"
Date: Mon, 5 Aug 2019 12:12:25 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

* Wei Yang (address@hidden) wrote:
> With the growth of migration capabilities, it is not proper to display
> them in "info migrate". Users are recommended to use "info
> migrate_capabiltiies" to list them.
> 
> Signed-off-by: Wei Yang <address@hidden>
> Suggested-by: Dr. David Alan Gilbert <address@hidden>
> 
> ---
> v2:
>   * remove capabilities from "info migrate"
> ---
>  monitor/hmp-cmds.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> index 99ceb0846b..05a09987da 100644
> --- a/monitor/hmp-cmds.c
> +++ b/monitor/hmp-cmds.c
> @@ -220,24 +220,13 @@ static char *SocketAddress_to_str(SocketAddress *addr)
>  void hmp_info_migrate(Monitor *mon, const QDict *qdict)
>  {
>      MigrationInfo *info;
> -    MigrationCapabilityStatusList *caps, *cap;
> +    MigrationCapabilityStatusList *caps;
>  
>      info = qmp_query_migrate(NULL);
>      caps = qmp_query_migrate_capabilities(NULL);

Why keep 'caps' and query them? Can't this go as well?

Dave

>      migration_global_dump(mon);
>  
> -    /* do not display parameters during setup */
> -    if (info->has_status && caps) {
> -        monitor_printf(mon, "capabilities: ");
> -        for (cap = caps; cap; cap = cap->next) {
> -            monitor_printf(mon, "%s: %s ",
> -                           MigrationCapability_str(cap->value->capability),
> -                           cap->value->state ? "on" : "off");
> -        }
> -        monitor_printf(mon, "\n");
> -    }
> -
>      if (info->has_status) {
>          monitor_printf(mon, "Migration status: %s",
>                         MigrationStatus_str(info->status));
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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