Author: cwittich
Date: Tue Sep 2 13:41:14 2008
New Revision: 35876
URL:
http://svn.reactos.org/svn/reactos?rev=35876&view=rev
Log:
-don't try to destroy the domain when the state is VIR_DOMAIN_SHUTOFF
Modified:
trunk/tools/sysreg2/virt.c
Modified: trunk/tools/sysreg2/virt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/virt.c?rev=35876&…
==============================================================================
--- trunk/tools/sysreg2/virt.c [iso-8859-1] (original)
+++ trunk/tools/sysreg2/virt.c [iso-8859-1] Tue Sep 2 13:41:14 2008
@@ -139,6 +139,7 @@
{
virConnectPtr vConn;
virDomainPtr vDom;
+ virDomainInfo info;
int Stage;
int Stages = 1; /* 1 for testing, should be set to 3 later */
char qemu_img_cmdline[300];
@@ -191,7 +192,10 @@
printf("Domain %s started.\n", virDomainGetName(vDom));
ProcessDebugData(GetConsole(vDom),
AppSettings.Timeout, Stage);
- virDomainDestroy(vDom);
+
+ virDomainGetInfo(vDom, &info);
+ if (info.state != VIR_DOMAIN_SHUTOFF)
+ virDomainDestroy(vDom);
virDomainUndefine(vDom);
virDomainFree(vDom);
}