diff options
author | Bamvor Jian Zhang <bjzhang@suse.com> | 2012-06-06 12:46:18 +0100 |
---|---|---|
committer | Bamvor Jian Zhang <bjzhang@suse.com> | 2012-06-06 12:46:18 +0100 |
commit | ab6671ba2613a0a05fc0914f60590610202aa4df (patch) | |
tree | 6850c25886f9c942c363f73e8ee1fbad0f26449e /tools/libxl/libxl.h | |
parent | 6cf7902d214993f6134cea28dc0ab18d624eab0f (diff) | |
download | xen-ab6671ba2613a0a05fc0914f60590610202aa4df.tar.gz xen-ab6671ba2613a0a05fc0914f60590610202aa4df.tar.bz2 xen-ab6671ba2613a0a05fc0914f60590610202aa4df.zip |
libxl: Add API to retrieve domain console tty
This api retrieve domain console from xenstore. With this new api, it is easy
to implement "virsh console" command in libvirt libxl driver.
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use NOGC instead of 0 to allow improvements to this infrastructure
in the future ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl.h')
-rw-r--r-- | tools/libxl/libxl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 53cba6fe77..05f0e01df5 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -570,6 +570,18 @@ int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_conso * guests using pygrub. */ int libxl_primary_console_exec(libxl_ctx *ctx, uint32_t domid_vm); +/* libxl_console_get_tty retrieves the specified domain's console tty path + * and stores it in path. Caller is responsible for freeing the memory. + */ +int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num, + libxl_console_type type, char **path); + +/* libxl_primary_console_get_tty retrieves the specified domain's primary + * console tty path and stores it in path. Caller is responsible for freeing + * the memory. + */ +int libxl_primary_console_get_tty(libxl_ctx *ctx, uint32_t domid_vm, char **path); + /* May be called with info_r == NULL to check for domain's existance */ int libxl_domain_info(libxl_ctx*, libxl_dominfo *info_r, uint32_t domid); |