]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Refuse to run shutdown/reboot on Dom0
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 22 Feb 2007 16:49:12 +0000 (16:49 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 22 Feb 2007 16:49:12 +0000 (16:49 +0000)
ChangeLog
src/xs_internal.c

index 8372481936ec72060232fc176de6767f4cdd14c2..cba4748a26a2e9a9c2138db5e4084f00513067b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Feb 22 11:45:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
+
+       * src/xs_internal.c: Refuse to do shutdown / reboot on
+       Dom0 guest. Signed-off-by: Kazuki Mizushima
+       <mizushima.kazuk@jp.fujitsu.com>
+
 Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
 
        * qemud/conf.c: fix another xml property leak.
index bf7e36e3431b9182aa72298659250159c3863323..be3b6b84dd26bed3fab5ddbfdf4d8a667d4a683c 100644 (file)
@@ -630,7 +630,7 @@ xenStoreDomainShutdown(virDomainPtr domain)
                         __FUNCTION__);
         return(-1);
     }
-    if (domain->id == -1)
+    if (domain->id == -1 || domain->id == 0)
         return(-1);
     /*
      * this is very hackish, the domU kernel probes for a special 
@@ -658,7 +658,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
                         __FUNCTION__);
         return(-1);
     }
-    if (domain->id == -1)
+    if (domain->id == -1 || domain->id == 0)
         return(-1);
     /*
      * this is very hackish, the domU kernel probes for a special