This time we don't want to deprecate the API itself; instead,
we want warning to be reported whenever some specific condition
is met.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/conf/domain_conf.c | 11 ++++++++---
src/libvirt-domain.c | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9911d56130..da0f1ed025 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19114,9 +19114,14 @@ virDomainDefParseCaps(virDomainDefPtr def,
} else {
if (!def->os.arch)
def->os.arch = capsdata->arch;
- if ((!def->os.machine &&
- VIR_STRDUP(def->os.machine, capsdata->machinetype) < 0))
- goto cleanup;
+ if (!def->os.machine) {
+ virReportWarning(VIR_ERR_DEPRECATED_FEATURE,
+ "%s",
+ _("Missing machine type"));
+
+ if (VIR_STRDUP(def->os.machine, capsdata->machinetype) < 0)
+ goto cleanup;
+ }
}
ret = 0;
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a758539b6d..be1a67d8f6 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -6216,6 +6216,7 @@ virDomainDefineXMLFlags(virConnectPtr conn, const char *xml,
unsigned int flags)
ret = conn->driver->domainDefineXMLFlags(conn, xml, flags);
if (!ret)
goto error;
+ virDispatchError(conn);
return ret;
}
--
2.17.1