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

[Xen-changelog] domU always reports an error "Ignoring shutdown request: -1" when we



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 194f6230b62c3e448b7460611114772d01a1ea2d
# Parent  f507ca15ae003218b07c84aa390041d2316ed2bf
domU always reports an error "Ignoring shutdown request: -1" when we
shutdown it from dom0 (using "xm shutdown" command). This patch fixes
it.

Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>

diff -r f507ca15ae00 -r 194f6230b62c 
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Thu Aug 11 22:12:11 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Thu Aug 11 22:18:02 2005
@@ -6,6 +6,7 @@
 #include <linux/module.h>
 #include <linux/reboot.h>
 #include <linux/sysrq.h>
+#include <linux/stringify.h>
 #include <asm/irq.h>
 #include <asm/mmu_context.h>
 #include <asm-xen/evtchn.h>
@@ -254,7 +255,8 @@
     char *str;
 
     str = (char *)xenbus_read("control", "shutdown", NULL);
-    if (IS_ERR(str))
+    /* Ignore read errors and recursive shutdown events. */
+    if (IS_ERR(str) || !strcmp(str, __stringify(SHUTDOWN_INVALID)))
         return;
 
     xenbus_printf("control", "shutdown", "%i", SHUTDOWN_INVALID);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.