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] [xen-unstable] [LINUX] Call ctrl_alt_del() to trigger a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Call ctrl_alt_del() to trigger a reboot so we benefit from the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Feb 2007 09:45:13 -0800
Delivery-date: Tue, 13 Feb 2007 10:37:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1171380745 0
# Node ID df25547d76382e14411ea36b72c37b8131596f8d
# Parent  ad9bbd103034cfd566e2801cfd8d51813f1b0f95
[LINUX] Call ctrl_alt_del() to trigger a reboot so we benefit from the
generic infrastructure for cad_pid etc.

Add a ctrl_alt_del() implemenation to the PV on HVM compatibility
layer since ctrl_alt_del() is not exported on native kernels.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/reboot.c              |    3 ++-
 unmodified_drivers/linux-2.6/platform-pci/platform-compat.c |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff -r ad9bbd103034 -r df25547d7638 
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Fri Feb 09 18:19:24 
2007 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Tue Feb 13 15:32:25 
2007 +0000
@@ -100,6 +100,7 @@ static void shutdown_handler(struct xenb
 static void shutdown_handler(struct xenbus_watch *watch,
                             const char **vec, unsigned int len)
 {
+       extern void ctrl_alt_del(void);
        char *str;
        struct xenbus_transaction xbt;
        int err;
@@ -129,7 +130,7 @@ static void shutdown_handler(struct xenb
        if (strcmp(str, "poweroff") == 0)
                shutting_down = SHUTDOWN_POWEROFF;
        else if (strcmp(str, "reboot") == 0)
-               kill_proc(1, SIGINT, 1); /* interrupt init */
+               ctrl_alt_del();
        else if (strcmp(str, "suspend") == 0)
                shutting_down = SHUTDOWN_SUSPEND;
        else if (strcmp(str, "halt") == 0)
diff -r ad9bbd103034 -r df25547d7638 
unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c       Fri Feb 
09 18:19:24 2007 +0000
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c       Tue Feb 
13 15:32:25 2007 +0000
@@ -12,6 +12,12 @@ static int system_state = 1;
 static int system_state = 1;
 EXPORT_SYMBOL(system_state);
 #endif
+
+static inline void ctrl_alt_del(void)
+{
+       kill_proc(1, SIGINT, 1); /* interrupt init */
+}
+EXPORT_SYMBOL(ctrl_alt_del);
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
 size_t strcspn(const char *s, const char *reject)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [LINUX] Call ctrl_alt_del() to trigger a reboot so we benefit from the, Xen patchbot-unstable <=