mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 06:50:22 +00:00
libxl: use libxl_ctx passed to libxlConsoleCallback
Instead of using the libxl_ctx in the libxlDomainObjPrivatePtr, use the ctx passed to the callback. Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
parent
fc3ef44ea4
commit
b1d159d889
@ -1158,10 +1158,9 @@ libxlDomainFreeMem(libxlDomainObjPrivatePtr priv, libxl_domain_config *d_config)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
libxlConsoleCallback(libxl_ctx *ctx, libxl_event* ev, void *for_callback)
|
libxlConsoleCallback(libxl_ctx *ctx, libxl_event *ev, void *for_callback)
|
||||||
{
|
{
|
||||||
virDomainObjPtr vm = for_callback;
|
virDomainObjPtr vm = for_callback;
|
||||||
libxlDomainObjPrivatePtr priv = vm->privateData;
|
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
virObjectLock(vm);
|
virObjectLock(vm);
|
||||||
@ -1175,7 +1174,7 @@ libxlConsoleCallback(libxl_ctx *ctx, libxl_event* ev, void *for_callback)
|
|||||||
console_type =
|
console_type =
|
||||||
(chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL ?
|
(chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL ?
|
||||||
LIBXL_CONSOLE_TYPE_SERIAL : LIBXL_CONSOLE_TYPE_PV);
|
LIBXL_CONSOLE_TYPE_SERIAL : LIBXL_CONSOLE_TYPE_PV);
|
||||||
ret = libxl_console_get_tty(priv->ctx, ev->domid,
|
ret = libxl_console_get_tty(ctx, ev->domid,
|
||||||
chr->target.port, console_type,
|
chr->target.port, console_type,
|
||||||
&console);
|
&console);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
Loading…
Reference in New Issue
Block a user