diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-09 11:11:59 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-03-09 11:11:59 +0000 |
commit | e1bc13a960bab6c8efd73200138efeb31a5aa35f (patch) | |
tree | 7de4f5aef090bdf6d2ecbfc9ca78b69febd3696a /tools/libxc/xc_misc.c | |
parent | f064d42ef8af59f9ae7378fe5b0ec8dd7f2a40ca (diff) | |
download | xen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.tar.gz xen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.tar.bz2 xen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.zip |
xm: New command 'debug-keys' to inject debug-key events into Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_misc.c')
-rw-r--r-- | tools/libxc/xc_misc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index b2a648528a..987eb0eb13 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -33,6 +33,25 @@ int xc_readconsolering(int xc_handle, return ret; } +int xc_send_debug_keys(int xc_handle, char *keys) +{ + int ret, len = strlen(keys); + DECLARE_SYSCTL; + + sysctl.cmd = XEN_SYSCTL_debug_keys; + set_xen_guest_handle(sysctl.u.debug_keys.keys, keys); + sysctl.u.debug_keys.nr_keys = len; + + if ( (ret = lock_pages(keys, len)) != 0 ) + return ret; + + ret = do_sysctl(xc_handle, &sysctl); + + unlock_pages(keys, len); + + return ret; +} + int xc_physinfo(int xc_handle, xc_physinfo_t *put_info) { |