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] xl: Add subcommand "xl debug-keys"

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: Add subcommand "xl debug-keys"
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 May 2010 05:16:22 -0700
Delivery-date: Wed, 19 May 2010 05:23:00 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274269876 -3600
# Node ID f981d865c8270acef9eba0909df1b30048dbaf53
# Parent  5cf04d1c393384d6b73be4cd6eeb5e3ce67a61d5
xl: Add subcommand "xl debug-keys"

Can be used to send debug keys to Xen.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
---
 tools/libxl/libxl.c       |    5 +++++
 tools/libxl/libxl.h       |    1 +
 tools/libxl/xl_cmdimpl.c  |   30 ++++++++++++++++++++++++++++++
 tools/libxl/xl_cmdimpl.h  |    1 +
 tools/libxl/xl_cmdtable.c |    5 +++++
 5 files changed, 42 insertions(+)

diff -r 5cf04d1c3933 -r f981d865c827 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed May 19 12:48:32 2010 +0100
+++ b/tools/libxl/libxl.c       Wed May 19 12:51:16 2010 +0100
@@ -2822,6 +2822,11 @@ int libxl_send_sysrq(struct libxl_ctx *c
     return 0;
 }
 
+int libxl_send_debug_keys(struct libxl_ctx *ctx, char *keys)
+{
+    return xc_send_debug_keys(ctx->xch, keys);
+}
+
 uint32_t libxl_vm_get_start_time(struct libxl_ctx *ctx, uint32_t domid)
 {
     char *dompath = libxl_xs_get_dompath(ctx, domid);
diff -r 5cf04d1c3933 -r f981d865c827 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Wed May 19 12:48:32 2010 +0100
+++ b/tools/libxl/libxl.h       Wed May 19 12:51:16 2010 +0100
@@ -511,6 +511,7 @@ int libxl_send_trigger(struct libxl_ctx 
 int libxl_send_trigger(struct libxl_ctx *ctx, uint32_t domid,
                        char *trigger_name, uint32_t vcpuid);
 int libxl_send_sysrq(struct libxl_ctx *ctx, uint32_t domid, char sysrq);
+int libxl_send_debug_keys(struct libxl_ctx *ctx, char *keys);
 uint32_t libxl_vm_get_start_time(struct libxl_ctx *ctx, uint32_t domid);
 
 char *libxl_tmem_list(struct libxl_ctx *ctx, uint32_t domid, int use_long);
diff -r 5cf04d1c3933 -r f981d865c827 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed May 19 12:48:32 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Wed May 19 12:51:16 2010 +0100
@@ -3212,6 +3212,36 @@ int main_sysrq(int argc, char **argv)
     exit(0);
 }
 
+int main_debug_keys(int argc, char **argv)
+{
+    int opt;
+    char *keys;
+
+    while ((opt = getopt(argc, argv, "h")) != -1) {
+        switch (opt) {
+        case 'h':
+            help("debug-keys");
+            exit(0);
+        default:
+            fprintf(stderr, "option not supported\n");
+            break;
+        }
+    }
+    if (optind >= argc) {
+        help("debug-keys");
+        exit(2);
+    }
+
+    keys = argv[optind];
+
+    if (libxl_send_debug_keys(&ctx, keys)) {
+        fprintf(stderr, "cannot send debug keys: %s\n", keys);
+        exit(1);
+    }
+
+    exit(0);
+}
+
 int main_top(int argc, char **argv)
 {
     int opt;
diff -r 5cf04d1c3933 -r f981d865c827 tools/libxl/xl_cmdimpl.h
--- a/tools/libxl/xl_cmdimpl.h  Wed May 19 12:48:32 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.h  Wed May 19 12:51:16 2010 +0100
@@ -44,6 +44,7 @@ int main_rename(int argc, char **argv);
 int main_rename(int argc, char **argv);
 int main_trigger(int argc, char **argv);
 int main_sysrq(int argc, char **argv);
+int main_debug_keys(int argc, char **argv);
 int main_top(int argc, char **argv);
 int main_networkattach(int argc, char **argv);
 int main_networklist(int argc, char **argv);
diff -r 5cf04d1c3933 -r f981d865c827 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Wed May 19 12:48:32 2010 +0100
+++ b/tools/libxl/xl_cmdtable.c Wed May 19 12:51:16 2010 +0100
@@ -186,6 +186,11 @@ struct cmd_spec cmd_table[] = {
       "Send a sysrq to a domain",
       "<Domain> <letter>",
     },
+    { "debug-keys",
+      &main_debug_keys,
+      "Send debug keys to Xen",
+      "<Keys>",
+    },
     { "top",
       &main_top,
       "Monitor a host and the domains in real time",

_______________________________________________
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] xl: Add subcommand "xl debug-keys", Xen patchbot-unstable <=