# 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
|