[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Make sysrq work.



ChangeSet 1.1806.1.1, 2005/03/29 00:57:29+00:00, mwilli2@xxxxxxxxxxxxxxxxxxxx

        Make sysrq work.
        
        Signed-off-by: <mark.williamson@xxxxxxxxxxxx>



 linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c |    2 +-
 tools/python/xen/lowlevel/xu/xu.c                |    3 +++
 xen/include/public/io/domain_controller.h        |    4 ++++
 3 files changed, 8 insertions(+), 1 deletion(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-29 03:06:19 
-05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-03-29 03:06:19 
-05:00
@@ -242,7 +242,7 @@
     else if ( (pending_sysrq == -1) && 
               (msg->subtype == CMSG_SHUTDOWN_SYSRQ) )
     {
-        pending_sysrq = msg->msg[0];
+        pending_sysrq = ((shutdown_sysrq_t *)&msg->msg[0])->key;
         schedule_work(&sysrq_work);
     }
     else
diff -Nru a/tools/python/xen/lowlevel/xu/xu.c 
b/tools/python/xen/lowlevel/xu/xu.c
--- a/tools/python/xen/lowlevel/xu/xu.c 2005-03-29 03:06:19 -05:00
+++ b/tools/python/xen/lowlevel/xu/xu.c 2005-03-29 03:06:19 -05:00
@@ -671,6 +671,9 @@
         P2C(mem_request_t, target, u32);
         P2C(mem_request_t, status, u32);
         break;
+    case TYPE(CMSG_SHUTDOWN, CMSG_SHUTDOWN_SYSRQ):
+        P2C(shutdown_sysrq_t, key, char);
+        break;
     }
 
     if ( dict_items_parsed != PyDict_Size(payload) )
diff -Nru a/xen/include/public/io/domain_controller.h 
b/xen/include/public/io/domain_controller.h
--- a/xen/include/public/io/domain_controller.h 2005-03-29 03:06:19 -05:00
+++ b/xen/include/public/io/domain_controller.h 2005-03-29 03:06:19 -05:00
@@ -545,6 +545,10 @@
                                     /* SHUTDOWN_suspend.                     */
 #define CMSG_SHUTDOWN_SYSRQ     3
 
+typedef struct {
+    char key;      /* 0: sysrq key */
+    char __pad[3]; /* 1: */
+} PACKED shutdown_sysrq_t; /* 4 bytes */
 
 /******************************************************************************
  * MEMORY CONTROLS

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.