Old GCC isn't happy about the {0} initializer because the first
field in the struct is itself a struct.
../../tests/openvzutilstest.c: In function 'testReadNetworkConf':
../../tests/openvzutilstest.c:101:12: error: missing braces around initializer [-Werror=missing-braces]
struct openvz_driver driver = {0};
^
This fixes commit 4a4132b4625778cf80acb9c92d06351b44468ac3
Signed-off-by: Daniel Berrange <berrange@localhost.localdomain>
---
tests/openvzutilstest.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/openvzutilstest.c b/tests/openvzutilstest.c
index c395b9dc19..2b1a9fb5ce 100644
--- a/tests/openvzutilstest.c
+++ b/tests/openvzutilstest.c
@@ -98,10 +98,10 @@ testReadNetworkConf(const void *data G_GNUC_UNUSED)
" </interface>\n"
" </devices>\n"
"</domain>\n";
- struct openvz_driver driver = {0};
-
- driver.xmlopt = openvzXMLOption(&driver);
- driver.caps = openvzCapsInit();
+ struct openvz_driver driver = {
+ .xmlopt = openvzXMLOption(&driver),
+ .caps = openvzCapsInit(),
+ };
if (!(def = virDomainDefNew()))
goto cleanup;
--
2.23.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
The virDomainVideoDefNew requires the xml options to be
provided since
commit 3dbf3941ad7202ec4426cfe965d8ba97ee8d49df
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: Mon Sep 23 14:44:35 2019 +0400
conf: add privateData to virDomainVideoDef
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
src/vz/vz_sdk.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 0daffb6844..59d7d31419 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -544,7 +544,8 @@ prlsdkGetDomainState(virDomainObjPtr dom, PRL_HANDLE sdkdom, VIRTUAL_MACHINE_STA
}
static int
-prlsdkAddDomainVideoInfoCt(virDomainDefPtr def)
+prlsdkAddDomainVideoInfoCt(virDomainDefPtr def,
+ virDomainXMLOptionPtr xmlopt)
{
virDomainVideoDefPtr video = NULL;
int ret = -1;
@@ -552,7 +553,7 @@ prlsdkAddDomainVideoInfoCt(virDomainDefPtr def)
if (def->ngraphics == 0)
return 0;
- if (!(video = virDomainVideoDefNew()))
+ if (!(video = virDomainVideoDefNew(xmlopt)))
goto cleanup;
video->type = VIR_DOMAIN_VIDEO_TYPE_PARALLELS;
@@ -1288,10 +1289,13 @@ prlsdkAddSerialInfo(PRL_HANDLE sdkdom,
static int
-prlsdkAddDomainHardware(vzDriverPtr driver, PRL_HANDLE sdkdom, virDomainDefPtr def)
+prlsdkAddDomainHardware(vzDriverPtr driver,
+ PRL_HANDLE sdkdom,
+ virDomainDefPtr def,
+ virDomainXMLOptionPtr xmlopt)
{
if (IS_CT(def)) {
- if (prlsdkAddDomainVideoInfoCt(def) < 0)
+ if (prlsdkAddDomainVideoInfoCt(def, xmlopt) < 0)
goto error;
} else {
if (prlsdkAddDomainVideoInfoVm(sdkdom, def) < 0)
@@ -1890,7 +1894,7 @@ prlsdkLoadDomain(vzDriverPtr driver,
goto error;
/* depends on prlsdkAddVNCInfo */
- if (prlsdkAddDomainHardware(driver, sdkdom, def) < 0)
+ if (prlsdkAddDomainHardware(driver, sdkdom, def, driver->xmlopt) < 0)
goto error;
/* depends on prlsdkAddDomainHardware */
--
2.23.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
This fixes commit 4a4132b4625778cf80acb9c92d06351b44468ac3
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
src/vz/vz_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 9e8ea676e0..7b90fee378 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -292,7 +292,7 @@ vzDomainDeviceDefValidate(const virDomainDeviceDef *dev,
vzDriverPtr driver = opaque;
if (dev->type == VIR_DOMAIN_DEVICE_DISK)
- return vzCheckUnsupportedDisk(def, dev->data.disk, driver->vzCaps);
+ return vzCheckUnsupportedDisk(def, dev->data.disk, &driver->vzCaps);
else if (dev->type == VIR_DOMAIN_DEVICE_GRAPHICS)
return vzCheckUnsupportedGraphics(dev->data.graphics);
--
2.23.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
This fixes commit 61bff77bf993ac782c850cfd1145e83c216e4a21
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
src/vz/vz_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 7b90fee378..7dd44ad153 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -718,6 +718,7 @@ static char *
vzDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
{
vzConnPtr privconn = domain->conn->privateData;
+ vzDriverPtr driver = privconn->driver;
virDomainDefPtr def;
virDomainObjPtr dom;
char *ret = NULL;
--
2.23.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
This fixes commit bf9d812956100442a195d99773620e1795b8633d
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
src/vz/vz_driver.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 7dd44ad153..bcdbb50404 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -1497,7 +1497,7 @@ static int vzDomainAttachDeviceFlags(virDomainPtr domain, const char *xml,
if (virDomainAttachDeviceFlagsEnsureACL(domain->conn, dom->def, flags) < 0)
goto cleanup;
- dev = virDomainDeviceDefParse(xml, dom->def, driver->caps,
+ dev = virDomainDeviceDefParse(xml, dom->def,
driver->xmlopt, NULL, VIR_DOMAIN_XML_INACTIVE);
if (dev == NULL)
goto cleanup;
@@ -1553,7 +1553,7 @@ static int vzDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
if (virDomainDetachDeviceFlagsEnsureACL(domain->conn, dom->def, flags) < 0)
goto cleanup;
- dev = virDomainDeviceDefParse(xml, dom->def, driver->caps,
+ dev = virDomainDeviceDefParse(xml, dom->def,
driver->xmlopt, NULL,
VIR_DOMAIN_XML_INACTIVE |
VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);
@@ -1645,7 +1645,7 @@ static int vzDomainUpdateDeviceFlags(virDomainPtr domain,
if (vzCheckConfigUpdateFlags(dom, &flags) < 0)
goto cleanup;
- if (!(dev = virDomainDeviceDefParse(xml, dom->def, driver->caps,
+ if (!(dev = virDomainDeviceDefParse(xml, dom->def,
driver->xmlopt, NULL,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@@ -2266,7 +2266,6 @@ vzDomainSnapshotGetXMLDesc(virDomainSnapshotPtr snapshot, unsigned int flags)
virUUIDFormat(snapshot->domain->uuid, uuidstr);
xml = virDomainSnapshotDefFormat(uuidstr, virDomainSnapshotObjGetDef(snap),
- privconn->driver->caps,
privconn->driver->xmlopt,
virDomainSnapshotFormatConvertXMLFlags(flags));
@@ -2597,7 +2596,7 @@ vzDomainSnapshotCreateXML(virDomainPtr domain,
if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_VALIDATE)
parse_flags |= VIR_DOMAIN_SNAPSHOT_PARSE_VALIDATE;
- if (!(def = virDomainSnapshotDefParseString(xmlDesc, driver->caps,
+ if (!(def = virDomainSnapshotDefParseString(xmlDesc,
driver->xmlopt, NULL, NULL,
parse_flags)))
goto cleanup;
--
2.23.0
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2026 Red Hat, Inc.