Re: [PATCH] qemu: Check if domain is active in GetControlInfo

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

 



On 03/03/16 13:43, Jiri Denemark wrote:
> Reporting status of a control connection makes no sense for an inactive
> domain.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1281706
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 4bd4071..9fd4c57 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2763,6 +2763,12 @@ qemuDomainGetControlInfo(virDomainPtr dom,
>      if (virDomainGetControlInfoEnsureACL(dom->conn, vm->def) < 0)
>          goto cleanup;
>  
> +    if (!virDomainObjIsActive(vm)) {
> +        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
> +                       _("domain is not running"));
> +        goto cleanup;
> +    }
> +
>      priv = vm->privateData;
>  
>      memset(info, 0, sizeof(*info));
> 

ACK

Erik

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]