mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
Rename virTypedParameterArrayValidate as virTypedParamsValidate
This commit is contained in:
parent
2ebd847924
commit
c40ed4168a
@ -64,7 +64,7 @@ ignored_functions = {
|
|||||||
"virDomainMigrateConfirm3": "private function for migration",
|
"virDomainMigrateConfirm3": "private function for migration",
|
||||||
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
|
"virDomainMigratePrepareTunnel3": "private function for tunnelled migration",
|
||||||
"DllMain": "specific function for Win32",
|
"DllMain": "specific function for Win32",
|
||||||
"virTypedParameterArrayValidate": "internal function in virtypedparam.c",
|
"virTypedParamsValidate": "internal function in virtypedparam.c",
|
||||||
"virTypedParameterAssign": "internal function in virtypedparam.c",
|
"virTypedParameterAssign": "internal function in virtypedparam.c",
|
||||||
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
|
"virTypedParameterAssignFromStr": "internal function in virtypedparam.c",
|
||||||
}
|
}
|
||||||
|
@ -3710,14 +3710,14 @@ esxDomainSetSchedulerParametersFlags(virDomainPtr domain,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_RESERVATION,
|
VIR_DOMAIN_SCHEDULER_RESERVATION,
|
||||||
VIR_TYPED_PARAM_LLONG,
|
VIR_TYPED_PARAM_LLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_LIMIT,
|
VIR_DOMAIN_SCHEDULER_LIMIT,
|
||||||
VIR_TYPED_PARAM_LLONG,
|
VIR_TYPED_PARAM_LLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_SHARES,
|
VIR_DOMAIN_SCHEDULER_SHARES,
|
||||||
VIR_TYPED_PARAM_INT,
|
VIR_TYPED_PARAM_INT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (esxVI_EnsureSession(priv->primary) < 0) {
|
if (esxVI_EnsureSession(priv->primary) < 0) {
|
||||||
@ -4874,10 +4874,10 @@ esxDomainSetMemoryParameters(virDomainPtr domain, virTypedParameterPtr params,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
|
VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (esxVI_EnsureSession(priv->primary) < 0) {
|
if (esxVI_EnsureSession(priv->primary) < 0) {
|
||||||
|
@ -1941,9 +1941,9 @@ virTPMCreateCancelPath;
|
|||||||
|
|
||||||
|
|
||||||
# util/virtypedparam.h
|
# util/virtypedparam.h
|
||||||
virTypedParameterArrayValidate;
|
|
||||||
virTypedParameterAssign;
|
virTypedParameterAssign;
|
||||||
virTypedParameterAssignFromStr;
|
virTypedParameterAssignFromStr;
|
||||||
|
virTypedParamsValidate;
|
||||||
|
|
||||||
|
|
||||||
# util/viruri.h
|
# util/viruri.h
|
||||||
|
@ -4395,12 +4395,12 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_SCHEDULER_CAP,
|
VIR_DOMAIN_SCHEDULER_CAP,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
libxlDriverLock(driver);
|
libxlDriverLock(driver);
|
||||||
|
@ -818,14 +818,14 @@ lxcDomainSetMemoryParameters(virDomainPtr dom,
|
|||||||
virLXCDomainObjPrivatePtr priv;
|
virLXCDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
lxcDriverLock(driver);
|
lxcDriverLock(driver);
|
||||||
@ -1851,14 +1851,14 @@ lxcDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_CPU_SHARES,
|
VIR_DOMAIN_SCHEDULER_CPU_SHARES,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_VCPU_PERIOD,
|
VIR_DOMAIN_SCHEDULER_VCPU_PERIOD,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_VCPU_QUOTA,
|
VIR_DOMAIN_SCHEDULER_VCPU_QUOTA,
|
||||||
VIR_TYPED_PARAM_LLONG,
|
VIR_TYPED_PARAM_LLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
lxcDriverLock(driver);
|
lxcDriverLock(driver);
|
||||||
@ -2105,10 +2105,10 @@ lxcDomainSetBlkioParameters(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_BLKIO_WEIGHT,
|
VIR_DOMAIN_BLKIO_WEIGHT,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
lxcDriverLock(driver);
|
lxcDriverLock(driver);
|
||||||
|
@ -1196,14 +1196,14 @@ nodeSetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
|
|||||||
int i;
|
int i;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN,
|
VIR_NODE_MEMORY_SHARED_PAGES_TO_SCAN,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS,
|
VIR_NODE_MEMORY_SHARED_SLEEP_MILLISECS,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES,
|
VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!nodeMemoryParametersIsAllSupported(params, nparams))
|
if (!nodeMemoryParametersIsAllSupported(params, nparams))
|
||||||
|
@ -1871,14 +1871,14 @@ openvzDomainSetMemoryParameters(virDomainPtr domain,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
|
VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (i = 0; i < nparams; i++) {
|
for (i = 0; i < nparams; i++) {
|
||||||
|
@ -7440,12 +7440,12 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_BLKIO_WEIGHT,
|
VIR_DOMAIN_BLKIO_WEIGHT,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BLKIO_DEVICE_WEIGHT,
|
VIR_DOMAIN_BLKIO_DEVICE_WEIGHT,
|
||||||
VIR_TYPED_PARAM_STRING,
|
VIR_TYPED_PARAM_STRING,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
@ -7774,14 +7774,14 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
|
|||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
|
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
VIR_DOMAIN_MEMORY_HARD_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
VIR_DOMAIN_MEMORY_SOFT_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
@ -8059,12 +8059,12 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_NUMA_MODE,
|
VIR_DOMAIN_NUMA_MODE,
|
||||||
VIR_TYPED_PARAM_INT,
|
VIR_TYPED_PARAM_INT,
|
||||||
VIR_DOMAIN_NUMA_NODESET,
|
VIR_DOMAIN_NUMA_NODESET,
|
||||||
VIR_TYPED_PARAM_STRING,
|
VIR_TYPED_PARAM_STRING,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
@ -8399,18 +8399,18 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_CPU_SHARES,
|
VIR_DOMAIN_SCHEDULER_CPU_SHARES,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_VCPU_PERIOD,
|
VIR_DOMAIN_SCHEDULER_VCPU_PERIOD,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_VCPU_QUOTA,
|
VIR_DOMAIN_SCHEDULER_VCPU_QUOTA,
|
||||||
VIR_TYPED_PARAM_LLONG,
|
VIR_TYPED_PARAM_LLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD,
|
VIR_DOMAIN_SCHEDULER_EMULATOR_PERIOD,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA,
|
VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA,
|
||||||
VIR_TYPED_PARAM_LLONG,
|
VIR_TYPED_PARAM_LLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
@ -9212,20 +9212,20 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_BANDWIDTH_IN_AVERAGE,
|
VIR_DOMAIN_BANDWIDTH_IN_AVERAGE,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BANDWIDTH_IN_PEAK,
|
VIR_DOMAIN_BANDWIDTH_IN_PEAK,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BANDWIDTH_IN_BURST,
|
VIR_DOMAIN_BANDWIDTH_IN_BURST,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE,
|
VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BANDWIDTH_OUT_PEAK,
|
VIR_DOMAIN_BANDWIDTH_OUT_PEAK,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_BANDWIDTH_OUT_BURST,
|
VIR_DOMAIN_BANDWIDTH_OUT_BURST,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
@ -14560,20 +14560,20 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
|||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC,
|
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC,
|
||||||
VIR_TYPED_PARAM_ULLONG,
|
VIR_TYPED_PARAM_ULLONG,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
memset(&info, 0, sizeof(info));
|
memset(&info, 0, sizeof(info));
|
||||||
|
@ -2784,10 +2784,10 @@ testDomainSetSchedulerParametersFlags(virDomainPtr domain,
|
|||||||
int ret = -1, i;
|
int ret = -1, i;
|
||||||
|
|
||||||
virCheckFlags(0, -1);
|
virCheckFlags(0, -1);
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
testDriverLock(privconn);
|
testDriverLock(privconn);
|
||||||
|
@ -48,7 +48,7 @@ VIR_ENUM_IMPL(virTypedParameter, VIR_TYPED_PARAM_LAST,
|
|||||||
* parameters. Return 0 on success, -1 on failure with error message
|
* parameters. Return 0 on success, -1 on failure with error message
|
||||||
* already issued. */
|
* already issued. */
|
||||||
int
|
int
|
||||||
virTypedParameterArrayValidate(virTypedParameterPtr params, int nparams, ...)
|
virTypedParamsValidate(virTypedParameterPtr params, int nparams, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
# include "internal.h"
|
# include "internal.h"
|
||||||
|
|
||||||
int virTypedParameterArrayValidate(virTypedParameterPtr params, int nparams,
|
int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
|
||||||
/* const char *name, int type ... */ ...)
|
/* const char *name, int type ... */ ...)
|
||||||
ATTRIBUTE_SENTINEL ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_SENTINEL ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
int virTypedParameterAssign(virTypedParameterPtr param, const char *name,
|
int virTypedParameterAssign(virTypedParameterPtr param, const char *name,
|
||||||
|
@ -1277,12 +1277,12 @@ xenHypervisorSetSchedulerParameters(virConnectPtr conn,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virTypedParameterArrayValidate(params, nparams,
|
if (virTypedParamsValidate(params, nparams,
|
||||||
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
VIR_DOMAIN_SCHEDULER_WEIGHT,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
VIR_DOMAIN_SCHEDULER_CAP,
|
VIR_DOMAIN_SCHEDULER_CAP,
|
||||||
VIR_TYPED_PARAM_UINT,
|
VIR_TYPED_PARAM_UINT,
|
||||||
NULL) < 0)
|
NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user