On 05/04/2017 07:54 AM, Marc-André Lureau wrote:
> qemu-ga doesn't have greeting.
> 
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
>  scripts/qmp/qmp-shell | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: Eric Blake <[email protected]>

> diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
> index 04b8fa3eae..db24c87cdd 100755
> --- a/scripts/qmp/qmp-shell
> +++ b/scripts/qmp/qmp-shell
> @@ -265,6 +265,9 @@ class QMPShell(qmp.QEMUMonitorProtocol):
>  
>      def show_banner(self, msg='Welcome to the QMP low-level shell!'):
>          print msg
> +        if not self._greeting:
> +            print 'Connected'
> +            return
>          version = self._greeting['QMP']['version']['qemu']
>          print 'Connected to QEMU %d.%d.%d\n' % 
> (version['major'],version['minor'],version['micro'])
>  
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to