All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix reboot.c
@ 2005-08-11 11:52 aq
  2005-08-11 14:26 ` aq
  0 siblings, 1 reply; 2+ messages in thread
From: aq @ 2005-08-11 11:52 UTC (permalink / raw)
  To: List: Xen Developers

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

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>


# diffstat reboot2.patch 
 reboot.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: reboot2.patch --]
[-- Type: text/x-patch; name="reboot2.patch", Size: 523 bytes --]

diff -r d95ea17567c6 linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 08:59:47 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 20:40:09 2005
@@ -254,7 +254,8 @@
     char *str;
 
     str = (char *)xenbus_read("control", "shutdown", NULL);
-    if (IS_ERR(str))
+    if (IS_ERR(str)||
+        !strcmp(str, "-1"))      /* ignore recursive shutdown event */
         return;
 
     xenbus_printf("control", "shutdown", "%i", SHUTDOWN_INVALID);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix reboot.c
  2005-08-11 11:52 [PATCH] fix reboot.c aq
@ 2005-08-11 14:26 ` aq
  0 siblings, 0 replies; 2+ messages in thread
From: aq @ 2005-08-11 14:26 UTC (permalink / raw)
  To: List: Xen Developers

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On 8/11/05, aq <aquynh@gmail.com> wrote:
> domU always reports an error "Ignoring shutdown request: -1" when we
> shutdown it from dom0 (using "xm shutdown" command). This patch fixes
> it.
> 

oops, please take this patch instead (it is better to use stringify to
convert SHUTDOWN_INVALID  to a string)


Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>


# diffstat reboot3.patch 
 reboot.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

[-- Attachment #2: reboot3.patch --]
[-- Type: application/octet-stream, Size: 755 bytes --]

diff -r d95ea17567c6 linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 08:59:47 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Thu Aug 11 23:25:07 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))
+    if (IS_ERR(str)||
+        !strcmp(str, __stringify(SHUTDOWN_INVALID)))      /* ignore recursive shutdown event */
         return;
 
     xenbus_printf("control", "shutdown", "%i", SHUTDOWN_INVALID);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-11 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 11:52 [PATCH] fix reboot.c aq
2005-08-11 14:26 ` aq

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.