[libvirt] [PATCH] qemu: Error prompt when saving a shutoff domain
Daniel Veillard
veillard at redhat.com
Tue Feb 15 09:52:59 UTC 2011
On Tue, Feb 15, 2011 at 04:26:37PM +0800, Osier Yang wrote:
> * src/qemu/qemu_driver.c
> ---
> src/qemu/qemu_driver.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index c581cfe..8570e67 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -4647,6 +4647,12 @@ static int qemudDomainSave(virDomainPtr dom, const char *path)
> goto cleanup;
> }
>
> + if (!virDomainObjIsActive(vm)) {
> + qemuReportError(VIR_ERR_OPERATION_INVALID,
> + "%s", _("domain is not running"));
> + goto cleanup;
> + }
> +
> ret = qemudDomainSaveFlag(driver, dom, vm, path, compressed);
>
> cleanup:
Seems similar to the previous fix on managed save, ACK
But I note that the internal routine qemudDomainSaveFlag() used by both
front end does that check too, that sounds redundant.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list