conf: Rename virDomainVcpuInfoPtr to virDomainVcpuDefPtr

This commit is contained in:
Peter Krempa 2016-06-29 13:16:22 +02:00
parent 54f875dc53
commit c7d5dd3974
9 changed files with 31 additions and 31 deletions

View File

@ -1307,7 +1307,7 @@ void virDomainLeaseDefFree(virDomainLeaseDefPtr def)
static void
virDomainVcpuInfoClear(virDomainVcpuInfoPtr info)
virDomainVcpuDefClear(virDomainVcpuDefPtr info)
{
if (!info)
return;
@ -1331,7 +1331,7 @@ virDomainDefSetVcpusMax(virDomainDefPtr def,
return -1;
} else {
for (i = maxvcpus; i < def->maxvcpus; i++)
virDomainVcpuInfoClear(&def->vcpus[i]);
virDomainVcpuDefClear(&def->vcpus[i]);
VIR_SHRINK_N(def->vcpus, def->maxvcpus, def->maxvcpus - maxvcpus);
}
@ -1423,7 +1423,7 @@ virDomainDefGetOnlineVcpumap(const virDomainDef *def)
}
virDomainVcpuInfoPtr
virDomainVcpuDefPtr
virDomainDefGetVcpu(virDomainDefPtr def,
unsigned int vcpu)
{
@ -1442,7 +1442,7 @@ static virDomainThreadSchedParamPtr
virDomainDefGetVcpuSched(virDomainDefPtr def,
unsigned int vcpu)
{
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu)))
return NULL;
@ -1508,7 +1508,7 @@ virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
virBitmapSetAll(allcpumap);
for (i = 0; i < maxvcpus && i < ncpumaps; i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(def, i);
virBitmapPtr bitmap = NULL;
if (vcpu->cpumask)
@ -2522,7 +2522,7 @@ void virDomainDefFree(virDomainDefPtr def)
virDomainResourceDefFree(def->resource);
for (i = 0; i < def->maxvcpus; i++)
virDomainVcpuInfoClear(&def->vcpus[i]);
virDomainVcpuDefClear(&def->vcpus[i]);
VIR_FREE(def->vcpus);
/* hostdevs must be freed before nets (or any future "intelligent
@ -4178,7 +4178,7 @@ static void
virDomainDefRemoveOfflineVcpuPin(virDomainDefPtr def)
{
size_t i;
virDomainVcpuInfoPtr vcpu;
virDomainVcpuDefPtr vcpu;
for (i = 0; i < virDomainDefGetVcpusMax(def); i++) {
vcpu = virDomainDefGetVcpu(def, i);
@ -14885,7 +14885,7 @@ static int
virDomainVcpuPinDefParseXML(virDomainDefPtr def,
xmlNodePtr node)
{
virDomainVcpuInfoPtr vcpu;
virDomainVcpuDefPtr vcpu;
unsigned int vcpuid;
char *tmp = NULL;
int ret = -1;
@ -18518,8 +18518,8 @@ virDomainDefVcpuCheckAbiStability(virDomainDefPtr src,
}
for (i = 0; i < src->maxvcpus; i++) {
virDomainVcpuInfoPtr svcpu = &src->vcpus[i];
virDomainVcpuInfoPtr dvcpu = &dst->vcpus[i];
virDomainVcpuDefPtr svcpu = &src->vcpus[i];
virDomainVcpuDefPtr dvcpu = &dst->vcpus[i];
if (svcpu->online != dvcpu->online) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@ -22717,7 +22717,7 @@ virDomainCputuneDefFormat(virBufferPtr buf,
for (i = 0; i < def->maxvcpus; i++) {
char *cpumask;
virDomainVcpuInfoPtr vcpu = def->vcpus + i;
virDomainVcpuDefPtr vcpu = def->vcpus + i;
if (!vcpu->cpumask)
continue;

View File

@ -2029,10 +2029,10 @@ struct _virDomainCputune {
};
typedef struct _virDomainVcpuInfo virDomainVcpuInfo;
typedef virDomainVcpuInfo *virDomainVcpuInfoPtr;
typedef struct _virDomainVcpuDef virDomainVcpuDef;
typedef virDomainVcpuDef *virDomainVcpuDefPtr;
struct _virDomainVcpuInfo {
struct _virDomainVcpuDef {
bool online;
virBitmapPtr cpumask;
@ -2117,7 +2117,7 @@ struct _virDomainDef {
virDomainBlkiotune blkio;
virDomainMemtune mem;
virDomainVcpuInfoPtr vcpus;
virDomainVcpuDefPtr vcpus;
size_t maxvcpus;
int placement_mode;
virBitmapPtr cpumask;
@ -2251,7 +2251,7 @@ unsigned int virDomainDefGetVcpusMax(const virDomainDef *def);
int virDomainDefSetVcpus(virDomainDefPtr def, unsigned int vcpus);
unsigned int virDomainDefGetVcpus(const virDomainDef *def);
virBitmapPtr virDomainDefGetOnlineVcpumap(const virDomainDef *def);
virDomainVcpuInfoPtr virDomainDefGetVcpu(virDomainDefPtr def, unsigned int vcpu)
virDomainVcpuDefPtr virDomainDefGetVcpu(virDomainDefPtr def, unsigned int vcpu)
ATTRIBUTE_RETURN_CHECK;
unsigned long long virDomainDefGetMemoryInitial(const virDomainDef *def);

View File

@ -841,7 +841,7 @@ int
libxlDomainSetVcpuAffinities(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
virDomainVcpuInfoPtr vcpu;
virDomainVcpuDefPtr vcpu;
libxl_bitmap map;
virBitmapPtr cpumask = NULL;
size_t i;

View File

@ -2314,7 +2314,7 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
virDomainDefPtr targetDef = NULL;
virBitmapPtr pcpumap = NULL;
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
virDomainObjPtr vm;
int ret = -1;

View File

@ -874,7 +874,7 @@ qemuRestoreCgroupState(virDomainObjPtr vm)
goto error;
for (i = 0; i < virDomainDefGetVcpusMax(vm->def); i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
if (!vcpu->online)
continue;

View File

@ -1475,7 +1475,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo);
for (i = 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxinfo; i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
pid_t vcpupid = qemuDomainGetVcpuPid(vm, i);
if (!vcpu->online)
@ -4606,7 +4606,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriverPtr driver,
unsigned int vcpu)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
int ret = -1;
int rc;
int oldvcpus = virDomainDefGetVcpus(vm->def);
@ -4658,7 +4658,7 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver,
unsigned int vcpu)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
int ret = -1;
int rc;
int oldvcpus = virDomainDefGetVcpus(vm->def);
@ -4905,7 +4905,7 @@ qemuDomainPinVcpuLive(virDomainObjPtr vm,
virBitmapPtr cpumap)
{
virBitmapPtr tmpmap = NULL;
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
qemuDomainObjPrivatePtr priv = vm->privateData;
virCgroupPtr cgroup_vcpu = NULL;
char *str = NULL;
@ -4992,7 +4992,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
virDomainDefPtr persistentDef;
int ret = -1;
virBitmapPtr pcpumap = NULL;
virDomainVcpuInfoPtr vcpuinfo = NULL;
virDomainVcpuDefPtr vcpuinfo = NULL;
virQEMUDriverConfigPtr cfg = NULL;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
@ -9346,7 +9346,7 @@ qemuDomainSetNumaParamsLive(virDomainObjPtr vm,
virCgroupFree(&cgroup_temp);
for (i = 0; i < virDomainDefGetVcpusMax(vm->def); i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
if (!vcpu->online)
continue;
@ -9757,7 +9757,7 @@ qemuSetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup,
return 0;
for (i = 0; i < virDomainDefGetVcpusMax(vm->def); i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
if (!vcpu->online)
continue;

View File

@ -4577,7 +4577,7 @@ qemuProcessSetupVcpu(virDomainObjPtr vm,
unsigned int vcpuid)
{
pid_t vcpupid = qemuDomainGetVcpuPid(vm, vcpuid);
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, vcpuid);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, vcpuid);
qemuDomainObjPrivatePtr priv = vm->privateData;
char *mem_mask = NULL;
virDomainNumatuneMemMode mem_mode;
@ -4658,7 +4658,7 @@ qemuProcessSetupVcpu(virDomainObjPtr vm,
static int
qemuProcessSetupVcpus(virDomainObjPtr vm)
{
virDomainVcpuInfoPtr vcpu;
virDomainVcpuDefPtr vcpu;
unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
size_t i;

View File

@ -2457,7 +2457,7 @@ static int testDomainGetVcpus(virDomainPtr domain,
memset(cpumaps, 0, maxinfo * maplen);
for (i = 0; i < maxinfo; i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(def, i);
virBitmapPtr bitmap = NULL;
if (!vcpu->online)
@ -2493,7 +2493,7 @@ static int testDomainPinVcpu(virDomainPtr domain,
unsigned char *cpumap,
int maplen)
{
virDomainVcpuInfoPtr vcpuinfo;
virDomainVcpuDefPtr vcpuinfo;
virDomainObjPtr privdom;
virDomainDefPtr def;
int ret = -1;

View File

@ -2284,7 +2284,7 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
}
for (i = 0; i < virDomainDefGetVcpusMax(def); i++) {
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(def, i);
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(def, i);
if (vcpu->cpumask &&
!virBitmapEqual(def->cpumask, vcpu->cpumask)) {