mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 11:52:20 +00:00
libxl: libxl: Use per-domain ctx in libxlMakeDomCreateInfo
libxlMakeDomCreateInfo() uses the driver-wide libxl ctx when it would be more appropriate to use the per-domain ctx associated with the domain. Switch to using the per-domain libxl ctx.
This commit is contained in:
parent
cb0d49af11
commit
e1f67c90d5
@ -395,7 +395,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
libxlMakeDomCreateInfo(libxlDriverPrivatePtr driver,
|
libxlMakeDomCreateInfo(libxl_ctx *ctx,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
libxl_domain_create_info *c_info)
|
libxl_domain_create_info *c_info)
|
||||||
{
|
{
|
||||||
@ -413,7 +413,7 @@ libxlMakeDomCreateInfo(libxlDriverPrivatePtr driver,
|
|||||||
|
|
||||||
if (def->nseclabels &&
|
if (def->nseclabels &&
|
||||||
def->seclabels[0]->type == VIR_DOMAIN_SECLABEL_STATIC) {
|
def->seclabels[0]->type == VIR_DOMAIN_SECLABEL_STATIC) {
|
||||||
if (libxl_flask_context_to_sid(driver->ctx,
|
if (libxl_flask_context_to_sid(ctx,
|
||||||
def->seclabels[0]->label,
|
def->seclabels[0]->label,
|
||||||
strlen(def->seclabels[0]->label),
|
strlen(def->seclabels[0]->label),
|
||||||
&c_info->ssidref)) {
|
&c_info->ssidref)) {
|
||||||
@ -1024,10 +1024,11 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver,
|
|||||||
virDomainObjPtr vm, libxl_domain_config *d_config)
|
virDomainObjPtr vm, libxl_domain_config *d_config)
|
||||||
{
|
{
|
||||||
virDomainDefPtr def = vm->def;
|
virDomainDefPtr def = vm->def;
|
||||||
|
libxlDomainObjPrivatePtr priv = vm->privateData;
|
||||||
|
|
||||||
libxl_domain_config_init(d_config);
|
libxl_domain_config_init(d_config);
|
||||||
|
|
||||||
if (libxlMakeDomCreateInfo(driver, def, &d_config->c_info) < 0)
|
if (libxlMakeDomCreateInfo(priv->ctx, def, &d_config->c_info) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (libxlMakeDomBuildInfo(vm, d_config) < 0)
|
if (libxlMakeDomBuildInfo(vm, d_config) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user