mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
capabilities: use bool instead of int
While preparing to add a capability for active commit, I noticed that the existing code was abusing int for boolean values. * src/conf/capabilities.h (_virCapsGuestFeature, _virCapsHost) (virCapabilitiesNew, virCapabilitiesAddGuestFeature): Improve types. * src/conf/capabilities.c (virCapabilitiesNew) (virCapabilitiesAddGuestFeature): Adjust signature. * src/bhyve/bhyve_capabilities.c (virBhyveCapsBuild): Update clients. * src/esx/esx_driver.c (esxCapsInit): Likewise. * src/libxl/libxl_conf.c (libxlMakeCapabilities): Likewise. * src/lxc/lxc_conf.c (virLXCDriverCapsInit): Likewise. * src/openvz/openvz_conf.c (openvzCapsInit): Likewise. * src/parallels/parallels_driver.c (parallelsBuildCapabilities): Likewise. * src/phyp/phyp_driver.c (phypCapsInit): Likewise. * src/qemu/qemu_capabilities.c (virQEMUCapsInit) (virQEMUCapsInitGuestFromBinary): Likewise. * src/security/virt-aa-helper.c (get_definition): Likewise. * src/test/test_driver.c (testBuildCapabilities): Likewise. * src/uml/uml_conf.c (umlCapsInit): Likewise. * src/vbox/vbox_tmpl.c (vboxCapsInit): Likewise. * src/vmware/vmware_conf.c (vmwareCapsInit): Likewise. * src/xen/xen_hypervisor.c (xenHypervisorBuildCapabilities): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject): Likewise. * tests/qemucaps2xmltest.c (testGetCaps): Likewise. * tests/testutils.c (virTestGenericCapsInit): Likewise. * tests/testutilslxc.c (testLXCCapsInit): Likewise. * tests/testutilsqemu.c (testQemuCapsInit): Likewise. * tests/testutilsxen.c (testXenCapsInit): Likewise. * tests/vircaps2xmltest.c (buildVirCapabilities): Likewise. * tests/vircapstest.c (buildNUMATopology): Likewise. * tests/vmx2xmltest.c (testCapsInit): Likewise. * tests/xml2vmxtest.c (testCapsInit): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
06cf86e94b
commit
58156f39ce
@ -82,7 +82,7 @@ virBhyveCapsBuild(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((guest = virCapabilitiesAddGuest(caps, "hvm",
|
||||
|
@ -58,15 +58,15 @@ VIR_ONCE_GLOBAL_INIT(virCapabilities)
|
||||
/**
|
||||
* virCapabilitiesNew:
|
||||
* @hostarch: host machine architecture
|
||||
* @offlineMigrate: non-zero if offline migration is available
|
||||
* @liveMigrate: non-zero if live migration is available
|
||||
* @offlineMigrate: true if offline migration is available
|
||||
* @liveMigrate: true if live migration is available
|
||||
*
|
||||
* Allocate a new capabilities object
|
||||
*/
|
||||
virCapsPtr
|
||||
virCapabilitiesNew(virArch hostarch,
|
||||
int offlineMigrate,
|
||||
int liveMigrate)
|
||||
bool offlineMigrate,
|
||||
bool liveMigrate)
|
||||
{
|
||||
virCapsPtr caps;
|
||||
|
||||
@ -502,16 +502,16 @@ virCapabilitiesAddGuestDomain(virCapsGuestPtr guest,
|
||||
* virCapabilitiesAddGuestFeature:
|
||||
* @guest: guest to associate feature with
|
||||
* @name: name of feature ('pae', 'acpi', 'apic')
|
||||
* @defaultOn: non-zero if it defaults to on
|
||||
* @toggle: non-zero if its state can be toggled
|
||||
* @defaultOn: true if it defaults to on
|
||||
* @toggle: true if its state can be toggled
|
||||
*
|
||||
* Registers a feature for a guest domain
|
||||
* Registers a feature for a guest domain.
|
||||
*/
|
||||
virCapsGuestFeaturePtr
|
||||
virCapabilitiesAddGuestFeature(virCapsGuestPtr guest,
|
||||
const char *name,
|
||||
int defaultOn,
|
||||
int toggle)
|
||||
bool defaultOn,
|
||||
bool toggle)
|
||||
{
|
||||
virCapsGuestFeaturePtr feature;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* capabilities.h: hypervisor capabilities
|
||||
*
|
||||
* Copyright (C) 2006-2013 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2014 Red Hat, Inc.
|
||||
* Copyright (C) 2006-2008 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@ -37,8 +37,8 @@ typedef struct _virCapsGuestFeature virCapsGuestFeature;
|
||||
typedef virCapsGuestFeature *virCapsGuestFeaturePtr;
|
||||
struct _virCapsGuestFeature {
|
||||
char *name;
|
||||
int defaultOn;
|
||||
int toggle;
|
||||
bool defaultOn;
|
||||
bool toggle;
|
||||
};
|
||||
|
||||
typedef struct _virCapsGuestMachine virCapsGuestMachine;
|
||||
@ -148,8 +148,8 @@ struct _virCapsHost {
|
||||
unsigned int powerMgmt; /* Bitmask of the PM capabilities.
|
||||
* See enum virHostPMCapability.
|
||||
*/
|
||||
int offlineMigrate;
|
||||
int liveMigrate;
|
||||
bool offlineMigrate;
|
||||
bool liveMigrate;
|
||||
size_t nmigrateTrans;
|
||||
size_t nmigrateTrans_max;
|
||||
char **migrateTrans;
|
||||
@ -195,8 +195,8 @@ struct _virCaps {
|
||||
|
||||
extern virCapsPtr
|
||||
virCapabilitiesNew(virArch hostarch,
|
||||
int offlineMigrate,
|
||||
int liveMigrate);
|
||||
bool offlineMigrate,
|
||||
bool liveMigrate);
|
||||
|
||||
extern void
|
||||
virCapabilitiesFreeNUMAInfo(virCapsPtr caps);
|
||||
@ -254,8 +254,8 @@ virCapabilitiesAddGuestDomain(virCapsGuestPtr guest,
|
||||
extern virCapsGuestFeaturePtr
|
||||
virCapabilitiesAddGuestFeature(virCapsGuestPtr guest,
|
||||
const char *name,
|
||||
int defaultOn,
|
||||
int toggle);
|
||||
bool defaultOn,
|
||||
bool toggle);
|
||||
|
||||
extern int
|
||||
virCapabilitiesHostSecModelAddBaseLabel(virCapsHostSecModelPtr secmodel,
|
||||
|
@ -575,9 +575,9 @@ esxCapsInit(esxPrivate *priv)
|
||||
}
|
||||
|
||||
if (supportsLongMode == esxVI_Boolean_True) {
|
||||
caps = virCapabilitiesNew(VIR_ARCH_X86_64, 1, 1);
|
||||
caps = virCapabilitiesNew(VIR_ARCH_X86_64, true, true);
|
||||
} else {
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, 1, 1);
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, true, true);
|
||||
}
|
||||
|
||||
if (!caps)
|
||||
|
@ -1372,9 +1372,9 @@ libxlMakeCapabilities(libxl_ctx *ctx)
|
||||
virCapsPtr caps;
|
||||
|
||||
#ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(), 0, 0)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(), false, false)) == NULL)
|
||||
#else
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(), 1, 1)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(), true, true)) == NULL)
|
||||
#endif
|
||||
return NULL;
|
||||
|
||||
|
@ -70,11 +70,11 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
|
||||
char *lxc_path = NULL;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
/* Some machines have problematic NUMA toplogy causing
|
||||
* unexpected failures. We don't want to break the QEMU
|
||||
* unexpected failures. We don't want to break the lxc
|
||||
* driver in this scenario, so log errors & carry on
|
||||
*/
|
||||
if (nodeCapsInitNUMA(caps) < 0) {
|
||||
|
@ -172,7 +172,7 @@ virCapsPtr openvzCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (nodeCapsInitNUMA(caps) < 0)
|
||||
|
@ -125,7 +125,7 @@ parallelsBuildCapabilities(void)
|
||||
virNodeInfo nodeinfo;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if (nodeCapsInitNUMA(caps) < 0)
|
||||
|
@ -286,7 +286,7 @@ phypCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
/* Some machines have problematic NUMA toplogy causing
|
||||
|
@ -815,17 +815,18 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
||||
if (caps->host.cpu &&
|
||||
caps->host.cpu->model &&
|
||||
virQEMUCapsGetCPUDefinitions(qemubinCaps, NULL) > 0 &&
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", true, false))
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_BOOTINDEX) &&
|
||||
!virCapabilitiesAddGuestFeature(guest, "deviceboot", 1, 0))
|
||||
!virCapabilitiesAddGuestFeature(guest, "deviceboot", true, false))
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsGet(qemubinCaps, QEMU_CAPS_DISK_SNAPSHOT))
|
||||
hasdisksnapshot = true;
|
||||
|
||||
if (!virCapabilitiesAddGuestFeature(guest, "disksnapshot", hasdisksnapshot, 0))
|
||||
if (!virCapabilitiesAddGuestFeature(guest, "disksnapshot", hasdisksnapshot,
|
||||
false))
|
||||
goto cleanup;
|
||||
|
||||
if (virCapabilitiesAddGuestDomain(guest,
|
||||
@ -868,13 +869,13 @@ virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
|
||||
|
||||
if (((guestarch == VIR_ARCH_I686) ||
|
||||
(guestarch == VIR_ARCH_X86_64)) &&
|
||||
(virCapabilitiesAddGuestFeature(guest, "acpi", 1, 1) == NULL ||
|
||||
virCapabilitiesAddGuestFeature(guest, "apic", 1, 0) == NULL))
|
||||
(virCapabilitiesAddGuestFeature(guest, "acpi", true, true) == NULL ||
|
||||
virCapabilitiesAddGuestFeature(guest, "apic", true, false) == NULL))
|
||||
goto cleanup;
|
||||
|
||||
if ((guestarch == VIR_ARCH_I686) &&
|
||||
(virCapabilitiesAddGuestFeature(guest, "pae", 1, 0) == NULL ||
|
||||
virCapabilitiesAddGuestFeature(guest, "nonpae", 1, 0) == NULL))
|
||||
(virCapabilitiesAddGuestFeature(guest, "pae", true, false) == NULL ||
|
||||
virCapabilitiesAddGuestFeature(guest, "nonpae", true, false) == NULL))
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
@ -957,7 +958,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
|
||||
virArch hostarch = virArchFromHost();
|
||||
|
||||
if ((caps = virCapabilitiesNew(hostarch,
|
||||
1, 1)) == NULL)
|
||||
true, true)) == NULL)
|
||||
goto error;
|
||||
|
||||
/* Some machines have problematic NUMA toplogy causing
|
||||
|
@ -727,7 +727,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
|
||||
if (caps_mockup(ctl, xmlStr) != 0)
|
||||
goto exit;
|
||||
|
||||
if ((ctl->caps = virCapabilitiesNew(ctl->arch, 1, 1)) == NULL) {
|
||||
if ((ctl->caps = virCapabilitiesNew(ctl->arch, true, true)) == NULL) {
|
||||
vah_error(ctl, 0, _("could not allocate memory"));
|
||||
goto exit;
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ testBuildCapabilities(virConnectPtr conn)
|
||||
const char *const guest_types[] = { "hvm", "xen" };
|
||||
size_t i;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_I686, 0, 0)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_I686, false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
if (virCapabilitiesAddHostFeature(caps, "pae") < 0)
|
||||
@ -360,9 +360,9 @@ testBuildCapabilities(virConnectPtr conn)
|
||||
NULL) == NULL)
|
||||
goto error;
|
||||
|
||||
if (virCapabilitiesAddGuestFeature(guest, "pae", 1, 1) == NULL)
|
||||
if (virCapabilitiesAddGuestFeature(guest, "pae", true, true) == NULL)
|
||||
goto error;
|
||||
if (virCapabilitiesAddGuestFeature(guest, "nonpae", 1, 1) == NULL)
|
||||
if (virCapabilitiesAddGuestFeature(guest, "nonpae", true, true) == NULL)
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ virCapsPtr umlCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
/* Some machines have problematic NUMA toplogy causing
|
||||
|
@ -885,7 +885,7 @@ static virCapsPtr vboxCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (nodeCapsInitNUMA(caps) < 0)
|
||||
|
@ -65,7 +65,7 @@ vmwareCapsInit(void)
|
||||
virCPUDataPtr data = NULL;
|
||||
|
||||
if ((caps = virCapabilitiesNew(virArchFromHost(),
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
if (nodeCapsInitNUMA(caps) < 0)
|
||||
|
@ -2108,7 +2108,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
|
||||
int hv_major = hv_versions.hv >> 16;
|
||||
int hv_minor = hv_versions.hv & 0xFFFF;
|
||||
|
||||
if ((caps = virCapabilitiesNew(hostarch, 1, 1)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(hostarch, true, true)) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (hvm_type && STRNEQ(hvm_type, "") &&
|
||||
@ -2166,37 +2166,36 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
|
||||
if (guest_archs[i].pae &&
|
||||
virCapabilitiesAddGuestFeature(guest,
|
||||
"pae",
|
||||
1,
|
||||
0) == NULL)
|
||||
true,
|
||||
false) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (guest_archs[i].nonpae &&
|
||||
virCapabilitiesAddGuestFeature(guest,
|
||||
"nonpae",
|
||||
1,
|
||||
0) == NULL)
|
||||
true,
|
||||
false) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (guest_archs[i].ia64_be &&
|
||||
virCapabilitiesAddGuestFeature(guest,
|
||||
"ia64_be",
|
||||
1,
|
||||
0) == NULL)
|
||||
true,
|
||||
false) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
if (guest_archs[i].hvm) {
|
||||
if (virCapabilitiesAddGuestFeature(guest,
|
||||
"acpi",
|
||||
1, 1) == NULL)
|
||||
true, true) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
/* In Xen 3.1.0, APIC is always on and can't be toggled */
|
||||
if (virCapabilitiesAddGuestFeature(guest,
|
||||
"apic",
|
||||
1,
|
||||
(hv_major > 3 &&
|
||||
hv_minor > 0 ?
|
||||
0 : 1)) == NULL)
|
||||
true,
|
||||
!(hv_major > 3 &&
|
||||
hv_minor > 0)) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
/* Xen 3.3.x and beyond supports enabling/disabling
|
||||
@ -2205,8 +2204,8 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
|
||||
if ((hv_major == 3 && hv_minor >= 3) || (hv_major > 3))
|
||||
if (virCapabilitiesAddGuestFeature(guest,
|
||||
"hap",
|
||||
0,
|
||||
1) == NULL)
|
||||
false,
|
||||
true) == NULL)
|
||||
goto no_memory;
|
||||
|
||||
/* Xen 3.4.x and beyond supports the Viridian (Hyper-V)
|
||||
@ -2215,8 +2214,8 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch,
|
||||
if ((hv_major == 3 && hv_minor >= 4) || (hv_major > 3))
|
||||
if (virCapabilitiesAddGuestFeature(guest,
|
||||
"viridian",
|
||||
0,
|
||||
1) == NULL)
|
||||
false,
|
||||
true) == NULL)
|
||||
goto no_memory;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ getCapsObject(void)
|
||||
{
|
||||
virCapsGuestPtr guest1, guest2;
|
||||
virCapsGuestDomainPtr domain1, domain2;
|
||||
virCapsPtr caps = virCapabilitiesNew(virArchFromHost(), 0, 0);
|
||||
virCapsPtr caps = virCapabilitiesNew(virArchFromHost(), false, false);
|
||||
|
||||
if (!caps)
|
||||
return NULL;
|
||||
|
@ -110,7 +110,7 @@ testGetCaps(char *capsData, const testQemuData *data)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((caps = virCapabilitiesNew(data->guestarch, 0, 0)) == NULL) {
|
||||
if ((caps = virCapabilitiesNew(data->guestarch, false, false)) == NULL) {
|
||||
fprintf(stderr, "failed to create the fake capabilities");
|
||||
goto error;
|
||||
}
|
||||
|
@ -912,7 +912,7 @@ virCapsPtr virTestGenericCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64,
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_I686,
|
||||
|
@ -14,7 +14,7 @@ virCapsPtr testLXCCapsInit(void)
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64,
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((guest = virCapabilitiesAddGuest(caps, "exe", VIR_ARCH_I686,
|
||||
|
@ -249,7 +249,7 @@ virCapsPtr testQemuCapsInit(void)
|
||||
};
|
||||
|
||||
if ((caps = virCapabilitiesNew(host_cpu.arch,
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((caps->host.cpu = virCPUDefCopy(&host_cpu)) == NULL ||
|
||||
@ -259,7 +259,7 @@ virCapsPtr testQemuCapsInit(void)
|
||||
if ((guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_I686,
|
||||
"/usr/bin/qemu", NULL,
|
||||
nmachines, machines)) == NULL ||
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", true, false))
|
||||
goto cleanup;
|
||||
machines = NULL;
|
||||
|
||||
@ -277,7 +277,7 @@ virCapsPtr testQemuCapsInit(void)
|
||||
if ((guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_X86_64,
|
||||
"/usr/bin/qemu-system-x86_64", NULL,
|
||||
nmachines, machines)) == NULL ||
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
|
||||
!virCapabilitiesAddGuestFeature(guest, "cpuselection", true, false))
|
||||
goto cleanup;
|
||||
machines = NULL;
|
||||
|
||||
|
@ -23,7 +23,7 @@ virCapsPtr testXenCapsInit(void)
|
||||
|
||||
uname(&utsname);
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_I686,
|
||||
0, 0)) == NULL)
|
||||
false, false)) == NULL)
|
||||
return NULL;
|
||||
|
||||
nmachines = ARRAY_CARDINALITY(x86_machines);
|
||||
|
@ -41,7 +41,7 @@ buildVirCapabilities(int max_cells,
|
||||
int id;
|
||||
size_t i;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64, 0, 0)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64, false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
id = 0;
|
||||
|
@ -44,7 +44,7 @@ buildNUMATopology(int seq)
|
||||
int core_id, cell_id;
|
||||
int id;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64, 0, 0)) == NULL)
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64, false, false)) == NULL)
|
||||
goto error;
|
||||
|
||||
id = 0;
|
||||
|
@ -25,7 +25,7 @@ testCapsInit(void)
|
||||
{
|
||||
virCapsGuestPtr guest = NULL;
|
||||
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, 1, 1);
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, true, true);
|
||||
|
||||
if (caps == NULL) {
|
||||
return;
|
||||
|
@ -25,7 +25,7 @@ testCapsInit(void)
|
||||
{
|
||||
virCapsGuestPtr guest = NULL;
|
||||
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, 1, 1);
|
||||
caps = virCapabilitiesNew(VIR_ARCH_I686, true, true);
|
||||
|
||||
if (caps == NULL) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user