Can be used to send debug keys to Xen.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
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);
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);
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;
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);
"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",