ia64/xen-unstable

changeset 6131:194f6230b62c

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@gmail.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Aug 11 22:18:02 2005 +0000 (2005-08-11)
parents f507ca15ae00
children 822566f5cfdd
files linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 22:12:11 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 22:18:02 2005 +0000
     1.3 @@ -6,6 +6,7 @@
     1.4  #include <linux/module.h>
     1.5  #include <linux/reboot.h>
     1.6  #include <linux/sysrq.h>
     1.7 +#include <linux/stringify.h>
     1.8  #include <asm/irq.h>
     1.9  #include <asm/mmu_context.h>
    1.10  #include <asm-xen/evtchn.h>
    1.11 @@ -254,7 +255,8 @@ static void shutdown_handler(struct xenb
    1.12      char *str;
    1.13  
    1.14      str = (char *)xenbus_read("control", "shutdown", NULL);
    1.15 -    if (IS_ERR(str))
    1.16 +    /* Ignore read errors and recursive shutdown events. */
    1.17 +    if (IS_ERR(str) || !strcmp(str, __stringify(SHUTDOWN_INVALID)))
    1.18          return;
    1.19  
    1.20      xenbus_printf("control", "shutdown", "%i", SHUTDOWN_INVALID);