提交 33b62676 编写于 作者: D Daniel P. Berrangé

conf: drop virCapsPtr param from device post parse callback

None of the impls of this callback require the virCapsPtr param.
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 c9193362
...@@ -132,7 +132,6 @@ bhyveDomainDiskDefAssignAddress(bhyveConnPtr driver, ...@@ -132,7 +132,6 @@ bhyveDomainDiskDefAssignAddress(bhyveConnPtr driver,
static int static int
bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque, void *opaque,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -5215,7 +5215,6 @@ virDomainVsockDefPostParse(virDomainVsockDefPtr vsock) ...@@ -5215,7 +5215,6 @@ virDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
static int static int
virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev, virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt) virDomainXMLOptionPtr xmlopt)
{ {
...@@ -5470,7 +5469,6 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDeviceDefPtr dev, ...@@ -5470,7 +5469,6 @@ virDomainDeviceDefPostParseCheckFeatures(virDomainDeviceDefPtr dev,
static int static int
virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps,
unsigned int flags, unsigned int flags,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
void *parseOpaque) void *parseOpaque)
...@@ -5478,14 +5476,14 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, ...@@ -5478,14 +5476,14 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
int ret; int ret;
if (xmlopt->config.devicesPostParseCallback) { if (xmlopt->config.devicesPostParseCallback) {
ret = xmlopt->config.devicesPostParseCallback(dev, def, caps, flags, ret = xmlopt->config.devicesPostParseCallback(dev, def, flags,
xmlopt->config.priv, xmlopt->config.priv,
parseOpaque); parseOpaque);
if (ret < 0) if (ret < 0)
return ret; return ret;
} }
if ((ret = virDomainDeviceDefPostParseCommon(dev, def, caps, flags, xmlopt)) < 0) if ((ret = virDomainDeviceDefPostParseCommon(dev, def, flags, xmlopt)) < 0)
return ret; return ret;
if (virDomainDeviceDefPostParseCheckFeatures(dev, xmlopt) < 0) if (virDomainDeviceDefPostParseCheckFeatures(dev, xmlopt) < 0)
...@@ -5497,7 +5495,6 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, ...@@ -5497,7 +5495,6 @@ virDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
static int static int
virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps,
unsigned int flags, unsigned int flags,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
void *parseOpaque) void *parseOpaque)
...@@ -5513,7 +5510,7 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, ...@@ -5513,7 +5510,7 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev,
parseOpaque = data; parseOpaque = data;
} }
ret = virDomainDeviceDefPostParse(dev, def, caps, flags, xmlopt, parseOpaque); ret = virDomainDeviceDefPostParse(dev, def, flags, xmlopt, parseOpaque);
if (data && xmlopt->config.domainPostParseDataFree) if (data && xmlopt->config.domainPostParseDataFree)
xmlopt->config.domainPostParseDataFree(data); xmlopt->config.domainPostParseDataFree(data);
...@@ -5523,7 +5520,6 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev, ...@@ -5523,7 +5520,6 @@ virDomainDeviceDefPostParseOne(virDomainDeviceDefPtr dev,
struct virDomainDefPostParseDeviceIteratorData { struct virDomainDefPostParseDeviceIteratorData {
virCapsPtr caps;
virDomainXMLOptionPtr xmlopt; virDomainXMLOptionPtr xmlopt;
void *parseOpaque; void *parseOpaque;
unsigned int parseFlags; unsigned int parseFlags;
...@@ -5537,7 +5533,7 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def, ...@@ -5537,7 +5533,7 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def,
void *opaque) void *opaque)
{ {
struct virDomainDefPostParseDeviceIteratorData *data = opaque; struct virDomainDefPostParseDeviceIteratorData *data = opaque;
return virDomainDeviceDefPostParse(dev, def, data->caps, return virDomainDeviceDefPostParse(dev, def,
data->parseFlags, data->xmlopt, data->parseFlags, data->xmlopt,
data->parseOpaque); data->parseOpaque);
} }
...@@ -5814,7 +5810,7 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def, ...@@ -5814,7 +5810,7 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def,
int int
virDomainDefPostParse(virDomainDefPtr def, virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps, virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags, unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
void *parseOpaque) void *parseOpaque)
...@@ -5822,7 +5818,6 @@ virDomainDefPostParse(virDomainDefPtr def, ...@@ -5822,7 +5818,6 @@ virDomainDefPostParse(virDomainDefPtr def,
int ret = -1; int ret = -1;
bool localParseOpaque = false; bool localParseOpaque = false;
struct virDomainDefPostParseDeviceIteratorData data = { struct virDomainDefPostParseDeviceIteratorData data = {
.caps = caps,
.xmlopt = xmlopt, .xmlopt = xmlopt,
.parseFlags = parseFlags, .parseFlags = parseFlags,
.parseOpaque = parseOpaque, .parseOpaque = parseOpaque,
...@@ -7125,7 +7120,6 @@ virDomainDefValidate(virDomainDefPtr def, ...@@ -7125,7 +7120,6 @@ virDomainDefValidate(virDomainDefPtr def,
virDomainXMLOptionPtr xmlopt) virDomainXMLOptionPtr xmlopt)
{ {
struct virDomainDefPostParseDeviceIteratorData data = { struct virDomainDefPostParseDeviceIteratorData data = {
.caps = caps,
.xmlopt = xmlopt, .xmlopt = xmlopt,
.parseFlags = parseFlags, .parseFlags = parseFlags,
}; };
...@@ -16427,7 +16421,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt, ...@@ -16427,7 +16421,7 @@ virDomainVsockDefParseXML(virDomainXMLOptionPtr xmlopt,
virDomainDeviceDefPtr virDomainDeviceDefPtr
virDomainDeviceDefParse(const char *xmlStr, virDomainDeviceDefParse(const char *xmlStr,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps, virCapsPtr caps G_GNUC_UNUSED,
virDomainXMLOptionPtr xmlopt, virDomainXMLOptionPtr xmlopt,
void *parseOpaque, void *parseOpaque,
unsigned int flags) unsigned int flags)
...@@ -16585,7 +16579,7 @@ virDomainDeviceDefParse(const char *xmlStr, ...@@ -16585,7 +16579,7 @@ virDomainDeviceDefParse(const char *xmlStr,
} }
/* callback to fill driver specific device aspects */ /* callback to fill driver specific device aspects */
if (virDomainDeviceDefPostParseOne(dev, def, caps, flags, if (virDomainDeviceDefPostParseOne(dev, def, flags,
xmlopt, parseOpaque) < 0) xmlopt, parseOpaque) < 0)
return NULL; return NULL;
......
...@@ -2648,7 +2648,6 @@ typedef int (*virDomainDefPostParseCallback)(virDomainDefPtr def, ...@@ -2648,7 +2648,6 @@ typedef int (*virDomainDefPostParseCallback)(virDomainDefPtr def,
* private data). */ * private data). */
typedef int (*virDomainDeviceDefPostParseCallback)(virDomainDeviceDefPtr dev, typedef int (*virDomainDeviceDefPostParseCallback)(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps,
unsigned int parseFlags, unsigned int parseFlags,
void *opaque, void *opaque,
void *parseOpaque); void *parseOpaque);
......
...@@ -278,7 +278,6 @@ virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivateDataCallbacks = { ...@@ -278,7 +278,6 @@ virDomainXMLPrivateDataCallbacks libxlDomainXMLPrivateDataCallbacks = {
static int static int
libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -376,7 +376,6 @@ virLXCDomainDefPostParse(virDomainDefPtr def, ...@@ -376,7 +376,6 @@ virLXCDomainDefPostParse(virDomainDefPtr def,
static int static int
virLXCDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, virLXCDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -1103,7 +1103,6 @@ openvzDomainDefPostParse(virDomainDefPtr def, ...@@ -1103,7 +1103,6 @@ openvzDomainDefPostParse(virDomainDefPtr def,
static int static int
openvzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, openvzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -1079,7 +1079,6 @@ phypDomainDefPostParse(virDomainDefPtr def, ...@@ -1079,7 +1079,6 @@ phypDomainDefPostParse(virDomainDefPtr def,
static int static int
phypDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, phypDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -8031,7 +8031,6 @@ qemuDomainHostdevDefPostParse(virDomainHostdevDefPtr hostdev, ...@@ -8031,7 +8031,6 @@ qemuDomainHostdevDefPostParse(virDomainHostdevDefPtr hostdev,
static int static int
qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags, unsigned int parseFlags,
void *opaque, void *opaque,
void *parseOpaque) void *parseOpaque)
......
...@@ -133,7 +133,6 @@ vmwareDomainDefPostParse(virDomainDefPtr def, ...@@ -133,7 +133,6 @@ vmwareDomainDefPostParse(virDomainDefPtr def,
static int static int
vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -546,7 +546,6 @@ virVMXDomainDefPostParse(virDomainDefPtr def, ...@@ -546,7 +546,6 @@ virVMXDomainDefPostParse(virDomainDefPtr def,
static int static int
virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED, virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
const virDomainDef *def G_GNUC_UNUSED, const virDomainDef *def G_GNUC_UNUSED,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
...@@ -271,7 +271,6 @@ vzDomainDefValidate(const virDomainDef *def, ...@@ -271,7 +271,6 @@ vzDomainDefValidate(const virDomainDef *def,
static int static int
vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps G_GNUC_UNUSED,
unsigned int parseFlags G_GNUC_UNUSED, unsigned int parseFlags G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED,
void *parseOpaque G_GNUC_UNUSED) void *parseOpaque G_GNUC_UNUSED)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册