WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Avoid spurious "Ignoring shutdown request" messages, fi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Avoid spurious "Ignoring shutdown request" messages, fix memory leak and simplif
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Aug 2005 04:26:12 -0400
Delivery-date: Wed, 17 Aug 2005 08:27:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 7c1d66d4e51e74700bf30eea3d9c726e1f8e48a3
# Parent  26c03c17c418ba106ebda01502713da2fc9d28c6
Avoid spurious "Ignoring shutdown request" messages, fix memory leak and simplif
y code.
Also fix whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 26c03c17c418 -r 7c1d66d4e51e 
linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Tue Aug 16 17:02:49 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c     Wed Aug 17 08:26:58 2005
@@ -256,19 +256,23 @@
     char *str;
 
     str = (char *)xenbus_read("control", "shutdown", NULL);
-    /* Ignore read errors and recursive shutdown events. */
-    if (IS_ERR(str) || !strcmp(str, __stringify(SHUTDOWN_INVALID)))
+    /* Ignore read errors. */
+    if (IS_ERR(str))
         return;
-
-    xenbus_printf("control", "shutdown", "%i", SHUTDOWN_INVALID);
-
-    if (strcmp(str, "poweroff") == 0) {
+    if (strlen(str) == 0) {
+        kfree(str);
+        return;
+    }
+
+    xenbus_printf("control", "shutdown", "");
+
+    if (strcmp(str, "poweroff") == 0)
         shutting_down = SHUTDOWN_POWEROFF;
-    } else if (strcmp(str, "reboot") == 0) {
+    else if (strcmp(str, "reboot") == 0)
         shutting_down = SHUTDOWN_REBOOT;
-    } else if (strcmp(str, "suspend") == 0) {
+    else if (strcmp(str, "suspend") == 0)
         shutting_down = SHUTDOWN_SUSPEND;
-    } else {
+    else {
         printk("Ignoring shutdown request: %s\n", str);
         shutting_down = SHUTDOWN_INVALID;
     }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Avoid spurious "Ignoring shutdown request" messages, fix memory leak and simplif, Xen patchbot -unstable <=