[libvirt] [PATCH] docs: mention maintenance branches
by Eric Blake
Mitre tried to assign us two separate CVEs for the fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1047577, on the
grounds that the fixes were separated by more than an hour
and thus triggered different hourly snapshots. But we
explicitly do NOT want to treat transient security bugs as
CVEs if they can only be triggered by patches in libvirt.git
but where the problem is cleaned up before a formal release.
Meanwhile, I noticed that while our wiki mentioned maintenance
branches and releases, our formal documentation did not.
* docs/downloads.html.in: Contrast hourly snapshots with
maintenance branches.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Doc only, so suitable for 1.2.1 if it gets reviewed in time.
docs/downloads.html.in | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/docs/downloads.html.in b/docs/downloads.html.in
index 83b8751..ef03567 100644
--- a/docs/downloads.html.in
+++ b/docs/downloads.html.in
@@ -22,7 +22,9 @@
<p>
Once an hour, an automated snapshot is made from the git server
source tree. These snapshots should be usable, but we make no guarantees
- about their stability:
+ about their stability; furthermore, they should NOT be
+ considered formal releases, and they may have transient security
+ problems that will not be assigned a CVE:
</p>
<ul>
@@ -30,6 +32,27 @@
<li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.gz">libvirt.org HTTP server</a></li>
</ul>
+ <h2><a name="maintenance">Maintenance releases</a></h2>
+ <p>
+ In the git repository are several stable maintenance branches,
+ matching the
+ pattern <code>v<i>major</i>.<i>minor</i>.<i>micro</i>-maint</code>;
+ these branches are forked off the corresponding
+ <code>v<i>major</i>.<i>minor</i>.<i>micro</i></code> formal
+ release, and may have further releases of the
+ form <code>v<i>major</i>.<i>minor</i>.<i>micro</i>.<i>rel</i></code>.
+ These maintenance branches should only contain bug fixes, and no
+ new features, backported from the master branch, and are
+ supported. These maintenance branches are considered during
+ CVE analysis.
+ </p>
+
+ <p>
+ For more details about contents of maintenance releases, see
+ <a href="http://wiki.libvirt.org/page/Maintenance_Releases">the
+ wiki page</a>.
+ </p>
+
<h2><a name="git">GIT source repository</a></h2>
<p>
--
1.8.4.2
11 years, 5 months
[libvirt] [PATCH] Fix docs for PMWakeup/PMSuspend callback types
by Claudio Bley
s/is waken up/is woken up/
A registered PMSuspendCallback is called when the domain is suspended, not
when it is woken up.
Signed-off-by: Claudio Bley <cbley(a)av-test.de>
---
It's just a trivial fix, but I'd like some educated comment on the
grammar fix. IMO it is correct, or is there a better way to express
this?
include/libvirt/libvirt.h.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 018a5ce..5bdb2bc 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -4849,7 +4849,7 @@ typedef void (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
* always passes 0
* @opaque: application specified data
*
- * This callback occurs when the guest is waken up.
+ * This callback occurs when the guest is woken up.
*
* The callback signature to use when registering for an event of type
* VIR_DOMAIN_EVENT_ID_PMWAKEUP with virConnectDomainEventRegisterAny()
@@ -4867,7 +4867,7 @@ typedef void (*virConnectDomainEventPMWakeupCallback)(virConnectPtr conn,
* always passes 0
* @opaque: application specified data
*
- * This callback occurs when the guest is waken up.
+ * This callback occurs when the guest is suspended.
*
* The callback signature to use when registering for an event of type
* VIR_DOMAIN_EVENT_ID_PMSUSPEND with virConnectDomainEventRegisterAny()
--
1.7.9.5
11 years, 5 months
[libvirt] [PATCH v2] vbox: add support for v4.2.20+ and v4.3.4+
by Manuel VIVES
Hi,
While working on adding virDomain*Stats support to the vbox driver, we
found bugs in the VirtualBox API C bindings. These bugs have been fixed
in versions 4.2.20 and 4.3.4.
However, the changes in the C bindings are incompatible with the
vbox_CAPI_v4_2.h
and vbox_CAPI_v4_3.h files which are bundled in libvirt source code. This is
why the
following patch adds vbox_CAPI_v4_2_20.h and vbox_CAPI_v4_3_4.h.
As stated by Matthias Bolte, the actual underlying problem here is that
libvirt assumes that VirtualBox API can only change between release versions
(4.2 -> 4.3), but we have a case here where it changed (or got fixed) between
minor versions (4.2.18 -> 4.2.20).
This patch makes the VBOX_API_VERSION represent the full API
version number (i.e 4002 => 4002000) so there are specific version
numbers for Vbox 4.2.20 (4002020) and 4.3.4 (4003004)
As the patch is too big for the mailing list, it is publicly available
at http://git-lab.diateam.net/cots/libvirt.git/ with the branch name
'vbox-4.2.20-4.3.4-support-v2'
Regards,
Manuel VIVES
11 years, 5 months
[libvirt] [PATCH 0/2] v4: spice: expose the disable file transfer option
by Francesco Romani
Changes:
Addressed Christophe's comment and changed the error value.
Addressed Michal's comment and changed the capability is detected
(thanks for the hint on query-command-line-output, I was looking
in the wrong place).
Francesco Romani (2):
spice: detect if qemu can disable file transfer
spice: expose the QEMU disable file transfer option
docs/formatdomain.html.in | 8 +++++
docs/schemas/domaincommon.rng | 11 ++++++
src/conf/domain_conf.c | 31 ++++++++++++++++-
src/conf/domain_conf.h | 10 ++++++
src/libvirt_private.syms | 2 ++
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 9 +++++
tests/qemucapabilitiesdata/caps_1.6.0-1.caps | 1 +
tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 +
...emuxml2argv-graphics-spice-agent-file-xfer.args | 9 +++++
...qemuxml2argv-graphics-spice-agent-file-xfer.xml | 40 ++++++++++++++++++++++
.../qemuxml2argv-graphics-spice.args | 5 +--
.../qemuxml2argv-graphics-spice.xml | 1 +
tests/qemuxml2argvtest.c | 9 ++++-
15 files changed, 136 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-agent-file-xfer.xml
--
1.8.4.2
11 years, 5 months
[libvirt] [PATCH] lxc: do cleanup when failed to create new string
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/lxc/lxc_process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index c51c4d5..fc399fb 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1045,7 +1045,7 @@ int virLXCProcessStart(virConnectPtr conn,
if (virAsprintf(&logfile, "%s/%s.log",
cfg->logDir, vm->def->name) < 0)
- return -1;
+ goto cleanup;
if (!(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
--
1.8.2.1
11 years, 5 months
[libvirt] [PATCH] Really don't crash if a connection closes early
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1047577
When writing commit 173c291, I missed the fact virNetServerClientClose
unlocks the client object before actually clearing client->sock and thus
it is possible to hit a window when client->keepalive is NULL while
client->sock is not NULL. I was thinking client->sock == NULL was a
better check for a closed connection but apparently we have to go with
client->keepalive == NULL to actually fix the crash.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/rpc/virnetserverclient.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 7830b7f..52b4941 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -1546,7 +1546,7 @@ virNetServerClientStartKeepAlive(virNetServerClientPtr client)
/* The connection might have been closed before we got here and thus the
* keepalive object could have been removed too.
*/
- if (!client->sock) {
+ if (!client->keepalive) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("connection not open"));
goto cleanup;
--
1.8.5.2
11 years, 5 months
[libvirt] [PATCH] maint: ignore transient files during tests
by Eric Blake
I ran 'git add .' for a patch in progress, while in the middle
of running 'make check' to test my work, and was surprised when
it picked up some files I wasn't expecting.
* .gitignore: Ignore *.pem.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the trivial rule.
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 496c2ef..7005500 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@
*.loT
*.o
*.orig
+*.pem
*.pyc
*.rej
*.s
--
1.8.4.2
11 years, 5 months
[libvirt] [PATCH] Add helper program to create custom leases
by Nehal J Wani
Introduce helper program to catch events from dnsmasq and maintain a custom
lease file per network. It supports dhcpv4 and dhcpv6. The file is saved as
"<interface-name>.status".
The format of each lease is:
<expiry-time (epoch time)> <mac> <iaid> <ip-address> <hostname> <clientid>
Example of custom leases file content:
1385245780 52:54:00:2f:ba:76 * 192.168.150.153 * *
1385245781 52:54:00:2f:ba:76 3127926 2001:db8:ca2:2:1::6c * 00:04:76:00:cf:ae:b3:0b:fc:cd:0e:22:2e:97:76:65:74:ec
1385245964 52:54:00:44:7c:d7 * 192.168.150.219 iiit-ad885e4aa1 01:52:54:00:44:7c:d7
1385245964 52:54:00:44:7c:d7 * 192.168.150.219 * 01:52:54:00:44:7c:d7
1385246016 52:54:00:5d:99:92 * 192.168.150.212 iiit-ad885e4aa1 01:52:54:00:5d:99:92
1385246041 52:54:00:3b:16:e0 * 192.168.150.207 * *
1385246081 52:54:00:db:dd:98 * 192.168.150.234 * *
1385246088 52:54:00:db:dd:98 14409112 2001:db8:ca2:2:1::6d * 00:04:76:00:cf:ae:b3:0b:fc:cd:0e:22:2e:97:76:65:74:ec
---
src/util/leaseshelper.c | 232 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 232 insertions(+)
create mode 100644 src/util/leaseshelper.c
diff --git a/src/util/leaseshelper.c b/src/util/leaseshelper.c
new file mode 100644
index 0000000..9ed22a6
--- /dev/null
+++ b/src/util/leaseshelper.c
@@ -0,0 +1,232 @@
+/*
+ * leasehelper.c: Helper program to create custom leases file
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Nehal J Wani <nehaljw.kkd1(a)gmail.com>
+ *
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "virutil.h"
+#include "virthread.h"
+#include "virfile.h"
+#include "virbuffer.h"
+#include "virstring.h"
+#include "virerror.h"
+#include "viralloc.h"
+#include "configmake.h"
+
+#define VIR_FROM_THIS VIR_FROM_NETWORK
+
+/**
+ * VIR_NETWORK_DHCP_LEASE_FIELDS:
+ *
+ * Macro providing the maximum number of fields in an entry in
+ * the leases file
+ */
+#define VIR_NETWORK_DHCP_LEASE_FIELDS 6
+/**
+ * VIR_NETWORK_DHCP_LEASE_FILE_SIZE_MAX:
+ *
+ * Macro providing the upper limit on the size of leases file
+ */
+#define VIR_NETWORK_DHCP_LEASE_FILE_SIZE_MAX 2097152
+
+/*
+ * Use this when passing possibly-NULL strings to printf-a-likes.
+ */
+# define EMPTY_STR(s) ((s) ? (s) : "*")
+
+int
+main(int argc, char **argv) {
+
+ FILE *g = fopen("/tmp/wtf", "a");
+ int j;
+ for (j = 0; j < argc; j++)
+ fprintf(g, "called :: : %s, ", argv[j]);
+ fprintf(g, "\n");
+ fclose(g);
+
+ /* Doesn't hurt to check */
+ if (argc < 4) {
+ /* Refer man page of dnsmasq --dhcp-script for more details */
+ fprintf(stderr, "Usage: $program $action ${mac|clientid} $ip\n");
+ return -1;
+ }
+
+ const char *program_name = argv[0];
+ const char *action = argv[1];
+ const char *interface = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_INTERFACE"));
+ const char *expirytime = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_LEASE_EXPIRES"));
+ const char *mac = argv[2];
+ const char *ip = argv[3];
+ const char *iaid = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_IAID"));
+ const char *hostname = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_SUPPLIED_HOSTNAME"));
+ const char *clientid = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_CLIENT_ID"));
+ const char *leases_str = NULL;
+ char *lease_file = NULL;
+ char *lease_entries = NULL;
+ char *lease_entry = NULL;
+ char **lease_fields = NULL;
+ bool delete = false;
+ bool add = false;
+ int rv = -1;
+ int lease_file_len = 0;
+ FILE *fp = NULL;
+ long long expirytime_tmp = 0;
+ virBuffer buf_new_lease = VIR_BUFFER_INITIALIZER;
+ virBuffer buf_all_leases = VIR_BUFFER_INITIALIZER;
+
+ if (setlocale(LC_ALL, "") == NULL ||
+ bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
+ textdomain(PACKAGE) == NULL) {
+ fprintf(stderr, _("%s: initialization failed\n"), program_name);
+ exit(EXIT_FAILURE);
+ }
+
+ if (virThreadInitialize() < 0 ||
+ virErrorInitialize() < 0) {
+ fprintf(stderr, _("%s: initialization failed\n"), program_name);
+ exit(EXIT_FAILURE);
+ }
+
+ if (virAsprintf(&lease_file, "%s/%s.status", LOCALSTATEDIR
+ "/lib/libvirt/dnsmasq/", interface) < 0)
+ goto cleanup;
+
+ if (virGetEnvAllowSUID("DNSMASQ_IAID")) {
+ mac = EMPTY_STR(virGetEnvAllowSUID("DNSMASQ_MAC"));
+ clientid = argv[2];
+ }
+
+ /* Make sure dnsmasq knows the interface, otherwise something is wrong */
+ if (STREQ(interface, "*"))
+ goto cleanup;
+
+ /* Make sure the file exists. If not, 'touch' it */
+ if (virFileTouch(lease_file, 0644) < 0)
+ goto cleanup;
+
+ /* Read entire contents */
+ if ((lease_file_len = virFileReadAll(lease_file,
+ VIR_NETWORK_DHCP_LEASE_FILE_SIZE_MAX,
+ &lease_entries)) < 0) {
+ goto cleanup;
+ }
+
+ if (STREQ(action, "add") || STREQ(action, "old") || STREQ(action, "del")) {
+ if (mac || STREQ(action, "del")) {
+ /* Delete the corresponding lease */
+ delete = true;
+ if (STREQ(action, "add") || STREQ(action, "old")) {
+ fprintf(stderr, "add|old\n");
+ add = true;
+ /* Enter new lease */
+ virBufferAsprintf(&buf_new_lease, "%s %s %s %s %s %s\n",
+ expirytime, mac, iaid, ip, hostname, clientid);
+
+ if (virBufferError(&buf_new_lease)) {
+ virBufferFreeAndReset(&buf_new_lease);
+ virReportOOMError();
+ goto cleanup;
+ }
+ }
+ }
+ }
+
+ lease_entry = lease_entries[0] == '\0' ? NULL : lease_entries;
+
+ while (lease_entry) {
+ int nfields = 0;
+
+ char *eol = strchr(lease_entry, '\n');
+ *eol = '\0';
+
+ /* Split the lease line */
+ if (!(lease_fields = virStringSplit(lease_entry, " ",
+ VIR_NETWORK_DHCP_LEASE_FIELDS)))
+ goto cleanup;
+
+ nfields = virStringListLength(lease_fields);
+
+ /* Forward lease_entry to the next lease */
+ lease_entry = strchr(lease_entry, '\0');
+ if (lease_entry - lease_entries + 1 < lease_file_len)
+ lease_entry++;
+ else
+ lease_entry = NULL;
+
+ if (nfields != VIR_NETWORK_DHCP_LEASE_FIELDS)
+ goto cleanup;
+
+ if (virStrToLong_ll(lease_fields[0], NULL, 10, &expirytime_tmp) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to convert lease expiry time to integer: %s"),
+ lease_fields[0]);
+ goto cleanup;
+ }
+
+ /* Check whether lease has expired or not */
+ if (expirytime_tmp < (long long) time(NULL))
+ continue;
+ else if (delete && STREQ(lease_fields[3], ip))
+ continue;
+ else {
+ virBufferAsprintf(&buf_all_leases, "%s %s %s %s %s %s\n",
+ lease_fields[0], lease_fields[1], lease_fields[2],
+ lease_fields[3], lease_fields[4], lease_fields[5]);
+
+ if (virBufferError(&buf_all_leases)) {
+ virBufferFreeAndReset(&buf_all_leases);
+ virReportOOMError();
+ goto cleanup;
+ }
+ }
+ }
+
+ if (add) {
+ virBufferAsprintf(&buf_all_leases, "%s", virBufferContentAndReset(&buf_new_lease));
+
+ if (virBufferError(&buf_all_leases)) {
+ virBufferFreeAndReset(&buf_all_leases);
+ virReportOOMError();
+ goto cleanup;
+ }
+ }
+
+ rv = 0;
+
+ /* Write to file */
+ leases_str = virBufferContentAndReset(&buf_all_leases);
+ if (!leases_str)
+ leases_str = "";
+
+ if (virFileWriteStr(lease_file, leases_str, 0) < 0)
+ rv = -1;
+
+cleanup:
+ VIR_FREE(lease_file);
+ VIR_FREE(lease_entries);
+ if (lease_fields)
+ virStringFreeList(lease_fields);
+ return rv;
+}
--
1.8.1.4
11 years, 5 months
[libvirt] [PATCH] Fix memory leak in testDomainCreateXMLMixed()
by Nehal J Wani
While running objecteventtest, it was found that valgrind pointed out the
following memory leak:
==13025== 538 (56 direct, 482 indirect) bytes in 1 blocks are definitely lost in loss record 216 of 226
==13025== at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
==13025== by 0x4C65D8D: virAllocVar (viralloc.c:558)
==13025== by 0x4C9F055: virObjectNew (virobject.c:190)
==13025== by 0x4D2B2E8: virGetDomain (datatypes.c:220)
==13025== by 0x4D79180: testDomainDefineXML (test_driver.c:2962)
==13025== by 0x4D4977D: virDomainDefineXML (libvirt.c:8512)
==13025== by 0x4029C2: testDomainCreateXMLMixed (objecteventtest.c:226)
==13025== by 0x403A21: virtTestRun (testutils.c:138)
==13025== by 0x4021C2: mymain (objecteventtest.c:549)
==13025== by 0x4040C2: virtTestMain (testutils.c:593)
==13025== by 0x341F421A04: (below main) (libc-start.c:225)
==13025==
---
tests/objecteventtest.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/objecteventtest.c b/tests/objecteventtest.c
index 65642a2..de57970 100644
--- a/tests/objecteventtest.c
+++ b/tests/objecteventtest.c
@@ -245,6 +245,12 @@ testDomainCreateXMLMixed(const void *data)
if (id2 < 0)
goto cleanup;
+ if (dom != NULL) {
+ virDomainUndefine(dom);
+ virDomainDestroy(dom);
+ virDomainFree(dom);
+ }
+
dom = virDomainCreateXML(test->conn, domainDef, 0);
if (dom == NULL || virEventRunDefaultImpl() < 0)
goto cleanup;
--
1.8.1.4
11 years, 5 months
[libvirt] [PATCH v2] conf: Always use VIR_ERR_CONFIG_UNSUPPORTED on enumFromString() failures
by Christophe Fergeau
Currently, during XML parsing, when a call to a FromString() function to
get an enum value fails, the error which is reported is either
VIR_ERR_CONFIG_UNSUPPORTED, VIR_ERR_INTERNAL_ERROR or VIR_ERR_XML_ERROR.
This commit makes such conversion failures consistently return
VIR_ERR_CONFIG_UNSUPPORTED.
---
Changes since v1:
- return VIR_ERR_CONFIG_UNSUPPORTED instead of the too generic
VIR_ERR_XML_ERROR
src/conf/cpu_conf.c | 10 +-
src/conf/domain_conf.c | 172 +++++++++++++++++------------------
src/conf/interface_conf.c | 2 +-
src/conf/netdev_vlan_conf.c | 2 +-
src/conf/netdev_vport_profile_conf.c | 2 +-
src/conf/network_conf.c | 6 +-
src/conf/node_device_conf.c | 4 +-
src/conf/nwfilter_conf.c | 4 +-
src/conf/secret_conf.c | 2 +-
src/conf/snapshot_conf.c | 8 +-
src/conf/storage_conf.c | 16 ++--
src/conf/storage_encryption_conf.c | 4 +-
12 files changed, 116 insertions(+), 116 deletions(-)
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index c4917b8..3d015f2 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -221,7 +221,7 @@ virCPUDefParseXML(xmlNodePtr node,
def->mode = virCPUModeTypeFromString(cpuMode);
if (def->mode < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid mode attribute '%s'"),
cpuMode);
VIR_FREE(cpuMode);
@@ -249,7 +249,7 @@ virCPUDefParseXML(xmlNodePtr node,
VIR_FREE(match);
if (def->match < 0) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Invalid match attribute for CPU "
"specification"));
goto error;
@@ -265,7 +265,7 @@ virCPUDefParseXML(xmlNodePtr node,
goto error;
}
if ((def->arch = virArchFromString(arch)) == VIR_ARCH_NONE) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown architecture %s"), arch);
VIR_FREE(arch);
goto error;
@@ -285,7 +285,7 @@ virCPUDefParseXML(xmlNodePtr node,
if ((fallback = virXPathString("string(./model[1]/@fallback)", ctxt))) {
if ((def->fallback = virCPUFallbackTypeFromString(fallback)) < 0) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Invalid fallback attribute"));
goto error;
}
@@ -391,7 +391,7 @@ virCPUDefParseXML(xmlNodePtr node,
VIR_FREE(strpolicy);
if (policy < 0) {
- virReportError(VIR_ERR_XML_ERROR, "%s",
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Invalid CPU feature policy"));
goto error;
}
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 416d96e..f297ac7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3582,7 +3582,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
if (type) {
if ((info->type = virDomainDeviceAddressTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown address type '%s'"), type);
goto cleanup;
}
@@ -3687,7 +3687,7 @@ virDomainHostdevSubsysUsbDefParseXML(xmlNodePtr node,
def->startupPolicy =
virDomainStartupPolicyTypeFromString(startupPolicy);
if (def->startupPolicy <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown startup policy '%s'"),
startupPolicy);
VIR_FREE(startupPolicy);
@@ -4161,7 +4161,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
if (type) {
if ((def->source.subsys.type
= virDomainHostdevSubsysTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown host device source address type '%s'"),
type);
goto error;
@@ -4196,7 +4196,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
if ((def->source.subsys.u.scsi.sgio =
virDomainDeviceSGIOTypeFromString(sgio)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown sgio mode '%s'"), sgio);
goto error;
}
@@ -4211,7 +4211,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
if ((backendStr = virXPathString("string(./driver/@name)", ctxt)) &&
(((backend = virDomainHostdevSubsysPciBackendTypeFromString(backendStr)) < 0) ||
backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_DEFAULT)) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown PCI device <driver name='%s'/> "
"has been specified"), backendStr);
goto error;
@@ -4265,7 +4265,7 @@ virDomainHostdevDefParseXMLCaps(xmlNodePtr node ATTRIBUTE_UNUSED,
if (type) {
if ((def->source.caps.type
= virDomainHostdevCapsTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown host device source address type '%s'"),
type);
goto error;
@@ -4448,7 +4448,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt,
def->type = virDomainSeclabelTypeFromString(p);
VIR_FREE(p);
if (def->type <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s", _("invalid security type"));
goto error;
}
@@ -4838,7 +4838,7 @@ virDomainDiskSourcePoolDefParse(xmlNodePtr node,
if (mode &&
(source->mode = virDomainDiskSourcePoolModeTypeFromString(mode)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown source mode '%s' for volume type disk"),
mode);
goto cleanup;
@@ -4890,7 +4890,7 @@ virDomainDiskSourceDefParse(xmlNodePtr node,
}
if ((*proto = virDomainDiskProtocolTypeFromString(protocol)) < 0){
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown protocol type '%s'"), protocol);
goto cleanup;
}
@@ -4913,7 +4913,7 @@ virDomainDiskSourceDefParse(xmlNodePtr node,
if ((transport = virXMLPropString(child, "transport"))) {
host.transport = virDomainDiskProtocolTransportTypeFromString(transport);
if (host.transport < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown protocol transport type '%s'"),
transport);
goto cleanup;
@@ -5058,7 +5058,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
type = virXMLPropString(node, "type");
if (type) {
if ((def->type = virDomainDiskTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk type '%s'"), type);
goto error;
}
@@ -5130,7 +5130,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (trans) {
def->geometry.trans = virDomainDiskGeometryTransTypeFromString(trans);
if (def->geometry.trans <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid translation value '%s'"),
trans);
goto error;
@@ -5212,7 +5212,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
auth_secret_usage =
virSecretUsageTypeTypeFromString(usageType);
if (auth_secret_usage < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid secret type %s"),
usageType);
goto error;
@@ -5379,7 +5379,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
device = virXMLPropString(node, "device");
if (device) {
if ((def->device = virDomainDiskDeviceTypeFromString(device)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk device '%s'"), device);
goto error;
}
@@ -5454,7 +5454,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (snapshot) {
def->snapshot = virDomainSnapshotLocationTypeFromString(snapshot);
if (def->snapshot <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk snapshot setting '%s'"),
snapshot);
goto error;
@@ -5487,7 +5487,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (sgio) {
if ((def->sgio = virDomainDeviceSGIOTypeFromString(sgio)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk sgio mode '%s'"), sgio);
goto error;
}
@@ -5495,7 +5495,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (bus) {
if ((def->bus = virDomainDiskBusTypeFromString(bus)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk bus type '%s'"), bus);
goto error;
}
@@ -5520,7 +5520,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (tray) {
if ((def->tray_status = virDomainDiskTrayTypeFromString(tray)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk tray status '%s'"), tray);
goto error;
}
@@ -5539,7 +5539,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (removable) {
if ((def->removable = virDomainFeatureStateTypeFromString(removable)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk removable status '%s'"), removable);
goto error;
}
@@ -5570,14 +5570,14 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (cachetag &&
(def->cachemode = virDomainDiskCacheTypeFromString(cachetag)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk cache mode '%s'"), cachetag);
goto error;
}
if (error_policy &&
(def->error_policy = virDomainDiskErrorPolicyTypeFromString(error_policy)) <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk error policy '%s'"), error_policy);
goto error;
}
@@ -5586,7 +5586,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
(((def->rerror_policy
= virDomainDiskErrorPolicyTypeFromString(rerror_policy)) <= 0) ||
(def->rerror_policy == VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE))) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk read error policy '%s'"),
rerror_policy);
goto error;
@@ -5595,7 +5595,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
if (iotag) {
if ((def->iomode = virDomainDiskIoTypeFromString(iotag)) < 0 ||
def->iomode == VIR_DOMAIN_DISK_IO_DEFAULT) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk io mode '%s'"), iotag);
goto error;
}
@@ -5887,7 +5887,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
type = virXMLPropString(node, "type");
if (type) {
if ((def->type = virDomainControllerTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown controller type '%s'"), type);
goto error;
}
@@ -5906,7 +5906,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
model = virXMLPropString(node, "model");
if (model) {
if ((def->model = virDomainControllerModelTypeFromString(def, model)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown model type '%s'"), model);
goto error;
}
@@ -6081,7 +6081,7 @@ virDomainFSDefParseXML(xmlNodePtr node,
type = virXMLPropString(node, "type");
if (type) {
if ((def->type = virDomainFSTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown filesystem type '%s'"), type);
goto error;
}
@@ -6092,7 +6092,7 @@ virDomainFSDefParseXML(xmlNodePtr node,
accessmode = virXMLPropString(node, "accessmode");
if (accessmode) {
if ((def->accessmode = virDomainFSAccessModeTypeFromString(accessmode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown accessmode '%s'"), accessmode);
goto error;
}
@@ -6259,7 +6259,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
goto error;
}
if ((actual->type = virDomainNetTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown type '%s' in interface's <actual> element"), type);
goto error;
}
@@ -6302,7 +6302,7 @@ virDomainActualNetDefParseXML(xmlNodePtr node,
if (mode) {
int m;
if ((m = virNetDevMacVLanModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown mode '%s' in interface <actual> element"),
mode);
goto error;
@@ -6417,7 +6417,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
type = virXMLPropString(node, "type");
if (type != NULL) {
if ((int)(def->type = virDomainNetTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown interface type '%s'"), type);
goto error;
}
@@ -6684,7 +6684,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
if (mode != NULL) {
int m;
if ((m = virNetDevMacVLanModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Unknown mode has been specified"));
goto error;
}
@@ -6758,7 +6758,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
int name;
if ((name = virDomainNetBackendTypeFromString(backend)) < 0 ||
name == VIR_DOMAIN_NET_BACKEND_TYPE_DEFAULT) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown interface <driver name='%s'> "
"has been specified"),
backend);
@@ -6770,7 +6770,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
int m;
if ((m = virDomainNetVirtioTxModeTypeFromString(txmode)) < 0 ||
m == VIR_DOMAIN_NET_VIRTIO_TX_MODE_DEFAULT) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown interface <driver txmode='%s'> "
"has been specified"),
txmode);
@@ -6951,7 +6951,7 @@ virDomainChrDefParseTargetXML(virDomainChrDefPtr def,
if ((def->targetType =
virDomainChrTargetTypeFromString(def, def->deviceType,
targetType)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown target type '%s' specified for character device"),
targetType);
goto error;
@@ -7198,7 +7198,7 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDefPtr def,
def->data.tcp.protocol = VIR_DOMAIN_CHR_TCP_PROTOCOL_RAW;
else if ((def->data.tcp.protocol =
virDomainChrTcpProtocolTypeFromString(protocol)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown protocol '%s'"), protocol);
goto error;
}
@@ -7329,7 +7329,7 @@ virDomainChrDefParseXML(xmlXPathContextPtr ctxt,
if (type == NULL) {
def->source.type = VIR_DOMAIN_CHR_TYPE_PTY;
} else if ((def->source.type = virDomainChrTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown type presented to host for character device: %s"),
type);
goto error;
@@ -7337,7 +7337,7 @@ virDomainChrDefParseXML(xmlXPathContextPtr ctxt,
nodeName = (const char *) node->name;
if ((def->deviceType = virDomainChrDeviceTypeFromString(nodeName)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown character device type: %s"),
nodeName);
}
@@ -7417,7 +7417,7 @@ virDomainSmartcardDefParseXML(xmlNodePtr node,
goto error;
}
if ((def->type = virDomainSmartcardTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown smartcard device mode: %s"),
mode);
goto error;
@@ -7479,7 +7479,7 @@ virDomainSmartcardDefParseXML(xmlNodePtr node,
goto error;
}
if ((def->data.passthru.type = virDomainChrTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown type presented to host for "
"character device: %s"), type);
goto error;
@@ -7555,7 +7555,7 @@ virDomainTPMDefParseXML(xmlNodePtr node,
model = virXMLPropString(node, "model");
if (model != NULL &&
(int)(def->model = virDomainTPMModelTypeFromString(model)) < 0) {
- virReportError(VIR_ERR_INVALID_ARG,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown TPM frontend model '%s'"), model);
goto error;
} else {
@@ -7586,7 +7586,7 @@ virDomainTPMDefParseXML(xmlNodePtr node,
}
if ((int)(def->type = virDomainTPMBackendTypeFromString(backend)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown TPM backend type '%s'"),
backend);
goto error;
@@ -7646,14 +7646,14 @@ virDomainInputDefParseXML(const char *ostype,
}
if ((def->type = virDomainInputTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown input device type '%s'"), type);
goto error;
}
if (bus) {
if ((def->bus = virDomainInputBusTypeFromString(bus)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown input bus type '%s'"), bus);
goto error;
}
@@ -7739,7 +7739,7 @@ virDomainHubDefParseXML(xmlNodePtr node, unsigned int flags)
}
if ((def->type = virDomainHubTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown hub device type '%s'"), type);
goto error;
}
@@ -7787,7 +7787,7 @@ virDomainTimerDefParseXML(xmlNodePtr node,
goto error;
}
if ((def->name = virDomainTimerNameTypeFromString(name)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown timer name '%s'"), name);
goto error;
}
@@ -7809,7 +7809,7 @@ virDomainTimerDefParseXML(xmlNodePtr node,
tickpolicy = virXMLPropString(node, "tickpolicy");
if (tickpolicy != NULL) {
if ((def->tickpolicy = virDomainTimerTickpolicyTypeFromString(tickpolicy)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown timer tickpolicy '%s'"), tickpolicy);
goto error;
}
@@ -7819,7 +7819,7 @@ virDomainTimerDefParseXML(xmlNodePtr node,
track = virXMLPropString(node, "track");
if (track != NULL) {
if ((def->track = virDomainTimerTrackTypeFromString(track)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown timer track '%s'"), track);
goto error;
}
@@ -7838,7 +7838,7 @@ virDomainTimerDefParseXML(xmlNodePtr node,
mode = virXMLPropString(node, "mode");
if (mode != NULL) {
if ((def->mode = virDomainTimerModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown timer mode '%s'"), mode);
goto error;
}
@@ -7982,7 +7982,7 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
}
if ((def->type = virDomainGraphicsListenTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown graphics listen type '%s'"), type);
goto error;
}
@@ -8060,7 +8060,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
}
if ((def->type = virDomainGraphicsTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown graphics device type '%s'"), type);
goto error;
}
@@ -8332,7 +8332,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
if ((defaultMode = virXMLPropString(node, "defaultMode")) != NULL) {
if ((defaultModeVal = virDomainGraphicsSpiceChannelModeTypeFromString(defaultMode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown default spice channel mode %s"),
defaultMode);
VIR_FREE(defaultMode);
@@ -8376,7 +8376,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
}
if ((nameval = virDomainGraphicsSpiceChannelNameTypeFromString(name)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown spice channel name %s"),
name);
VIR_FREE(name);
@@ -8384,7 +8384,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
goto error;
}
if ((modeval = virDomainGraphicsSpiceChannelModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown spice channel mode %s"),
mode);
VIR_FREE(name);
@@ -8511,7 +8511,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
if ((copypasteVal =
virDomainGraphicsSpiceClipboardCopypasteTypeFromString(copypaste)) <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown copypaste value '%s'"), copypaste);
VIR_FREE(copypaste);
goto error;
@@ -8530,7 +8530,7 @@ virDomainGraphicsDefParseXML(xmlNodePtr node,
}
if ((modeVal = virDomainGraphicsSpiceMouseModeTypeFromString(mode)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown mouse mode value '%s'"),
mode);
VIR_FREE(mode);
@@ -8571,7 +8571,7 @@ virDomainSoundCodecDefParseXML(xmlNodePtr node)
type = virXMLPropString(node, "type");
if ((def->type = virDomainSoundCodecTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown codec type '%s'"), type);
goto error;
}
@@ -8604,7 +8604,7 @@ virDomainSoundDefParseXML(xmlNodePtr node,
model = virXMLPropString(node, "model");
if ((def->model = virDomainSoundModelTypeFromString(model)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown sound model '%s'"), model);
goto error;
}
@@ -8677,7 +8677,7 @@ virDomainWatchdogDefParseXML(xmlNodePtr node,
}
def->model = virDomainWatchdogModelTypeFromString(model);
if (def->model < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown watchdog model '%s'"), model);
goto error;
}
@@ -8688,7 +8688,7 @@ virDomainWatchdogDefParseXML(xmlNodePtr node,
else {
def->action = virDomainWatchdogActionTypeFromString(action);
if (def->action < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown watchdog action '%s'"), action);
goto error;
}
@@ -8732,7 +8732,7 @@ virDomainRNGDefParseXML(xmlNodePtr node,
}
if ((def->model = virDomainRNGModelTypeFromString(model)) < 0) {
- virReportError(VIR_ERR_XML_ERROR, _("unknown RNG model '%s'"), model);
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown RNG model '%s'"), model);
goto error;
}
@@ -8767,7 +8767,7 @@ virDomainRNGDefParseXML(xmlNodePtr node,
}
if ((def->backend = virDomainRNGBackendTypeFromString(backend)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown RNG backend model '%s'"), backend);
goto error;
}
@@ -8797,7 +8797,7 @@ virDomainRNGDefParseXML(xmlNodePtr node,
def->source.chardev->type = virDomainChrTypeFromString(type);
if (def->source.chardev->type < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown backend type '%s' for egd"),
type);
goto error;
@@ -8851,7 +8851,7 @@ virDomainMemballoonDefParseXML(xmlNodePtr node,
}
if ((def->model = virDomainMemballoonModelTypeFromString(model)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown memory balloon model '%s'"), model);
goto error;
}
@@ -8923,7 +8923,7 @@ virSysinfoParseXML(xmlNodePtr node,
goto error;
}
if ((def->type = virSysinfoTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown sysinfo type '%s'"), type);
goto error;
}
@@ -9159,7 +9159,7 @@ virDomainVideoDefParseXML(xmlNodePtr node,
if (type) {
if ((def->type = virDomainVideoTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown video model '%s'"), type);
goto error;
}
@@ -9245,7 +9245,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr xmlopt,
if (mode) {
if ((def->mode = virDomainHostdevModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown hostdev mode '%s'"), mode);
goto error;
}
@@ -9333,7 +9333,7 @@ virDomainRedirdevDefParseXML(xmlNodePtr node,
bus = virXMLPropString(node, "bus");
if (bus) {
if ((def->bus = virDomainRedirdevBusTypeFromString(bus)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown redirdev bus '%s'"), bus);
goto error;
}
@@ -9344,7 +9344,7 @@ virDomainRedirdevDefParseXML(xmlNodePtr node,
type = virXMLPropString(node, "type");
if (type) {
if ((def->source.chr.type = virDomainChrTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown redirdev character device type '%s'"), type);
goto error;
}
@@ -9599,7 +9599,7 @@ virDomainEventActionParseXML(xmlXPathContextPtr ctxt,
} else {
*val = convFunc(tmp);
if (*val < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown %s action: %s"), name, tmp);
VIR_FREE(tmp);
return -1;
@@ -9660,7 +9660,7 @@ virDomainDeviceDefParse(const char *xmlStr,
xmlStrEqual(node->name, BAD_CAST "serial")) {
dev->type = VIR_DOMAIN_DEVICE_CHR;
} else {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown device type '%s'"),
node->name);
goto error;
@@ -10619,7 +10619,7 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt,
goto cleanup;
}
if ((val = virDomainBootTypeFromString(dev)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown boot device '%s'"),
dev);
VIR_FREE(dev);
@@ -11023,7 +11023,7 @@ virDomainDefParseXML(xmlDocPtr xml,
}
if ((def->virtType = virDomainVirtTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid domain type %s"), tmp);
goto error;
}
@@ -11122,7 +11122,7 @@ virDomainDefParseXML(xmlDocPtr xml,
/* and info about it */
if ((tmp = virXPathString("string(./memory[1]/@dumpCore)", ctxt)) &&
(def->mem.dump_core = virDomainMemDumpTypeFromString(tmp)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid memory core dump attribute value '%s'"), tmp);
goto error;
}
@@ -11249,7 +11249,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (tmp) {
if ((def->placement_mode =
virDomainCpuPlacementModeTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported CPU placement mode '%s'"),
tmp);
goto error;
@@ -11465,7 +11465,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (mode) {
if ((def->numatune.memory.mode =
virDomainNumatuneMemModeTypeFromString(mode)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported NUMA memory "
"tuning mode '%s'"),
mode);
@@ -11494,7 +11494,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (placement) {
if ((placement_mode =
virNumaTuneMemPlacementModeTypeFromString(placement)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported memory placement "
"mode '%s'"), placement);
VIR_FREE(placement);
@@ -11579,7 +11579,7 @@ virDomainDefParseXML(xmlDocPtr xml,
for (i = 0; i < n; i++) {
int val = virDomainFeatureTypeFromString((const char *)nodes[i]->name);
if (val < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unexpected feature '%s'"), nodes[i]->name);
goto error;
}
@@ -11640,7 +11640,7 @@ virDomainDefParseXML(xmlDocPtr xml,
for (i = 0; i < n; i++) {
feature = virDomainHypervTypeFromString((const char *)nodes[i]->name);
if (feature < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported HyperV Enlightenment feature: %s"),
nodes[i]->name);
goto error;
@@ -11660,7 +11660,7 @@ virDomainDefParseXML(xmlDocPtr xml,
}
if ((value = virDomainFeatureStateTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid value of state argument "
"for HyperV Enlightenment feature '%s'"),
nodes[i]->name);
@@ -11681,7 +11681,7 @@ virDomainDefParseXML(xmlDocPtr xml,
}
if ((value = virDomainFeatureStateTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid value of state argument "
"for HyperV Enlightenment feature '%s'"),
nodes[i]->name);
@@ -11755,7 +11755,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if ((tmp = virXPathString("string(./clock/@offset)", ctxt)) &&
(def->clock.offset = virDomainClockOffsetTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown clock offset '%s'"), tmp);
goto error;
}
@@ -11799,7 +11799,7 @@ virDomainDefParseXML(xmlDocPtr xml,
tmp = virXPathString("string(./clock/@basis)", ctxt);
if (tmp) {
if ((def->clock.data.variable.basis = virDomainClockBasisTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown clock basis '%s'"), tmp);
goto error;
}
@@ -12686,7 +12686,7 @@ virDomainDefParseXML(xmlDocPtr xml,
int mode;
if ((mode = virDomainSmbiosModeTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown smbios mode '%s'"), tmp);
goto error;
}
@@ -12770,7 +12770,7 @@ virDomainObjParseXML(xmlDocPtr xml,
goto error;
}
if ((state = virDomainStateTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid domain state '%s'"), tmp);
VIR_FREE(tmp);
goto error;
@@ -12779,7 +12779,7 @@ virDomainObjParseXML(xmlDocPtr xml,
if ((tmp = virXPathString("string(./@reason)", ctxt))) {
if ((reason = virDomainStateReasonFromString(state, tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid domain state reason '%s'"), tmp);
VIR_FREE(tmp);
goto error;
@@ -12804,7 +12804,7 @@ virDomainObjParseXML(xmlDocPtr xml,
if (str) {
int flag = virDomainTaintTypeFromString(str);
if (flag < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown taint flag %s"), str);
VIR_FREE(str);
goto error;
diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index fd2e25e..8053307 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -662,7 +662,7 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType) {
}
type = virInterfaceTypeFromString(tmp);
if (type == -1) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown interface type %s"), tmp);
VIR_FREE(tmp);
return NULL;
diff --git a/src/conf/netdev_vlan_conf.c b/src/conf/netdev_vlan_conf.c
index b2ed2b0..f58b4b8 100644
--- a/src/conf/netdev_vlan_conf.c
+++ b/src/conf/netdev_vlan_conf.c
@@ -82,7 +82,7 @@ virNetDevVlanParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virNetDevVlanPtr de
}
if ((def->nativeMode
= virNativeVlanModeTypeFromString(nativeMode)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid \"nativeMode='%s'\" "
"in vlan <tag> element"),
nativeMode);
diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_profile_conf.c
index a16a04a..8d403c4 100644
--- a/src/conf/netdev_vport_profile_conf.c
+++ b/src/conf/netdev_vport_profile_conf.c
@@ -48,7 +48,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags)
if ((virtPortType = virXMLPropString(node, "type")) &&
(virtPort->virtPortType = virNetDevVPortTypeFromString(virtPortType)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown virtualport type %s"), virtPortType);
goto error;
}
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 481fc5b..8803143 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -1728,7 +1728,7 @@ virNetworkForwardDefParseXML(const char *networkName,
def->type = VIR_NETWORK_FORWARD_NAT;
} else {
if ((def->type = virNetworkForwardTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown forwarding type '%s'"), type);
goto cleanup;
}
@@ -1747,7 +1747,7 @@ virNetworkForwardDefParseXML(const char *networkName,
= virNetworkForwardDriverNameTypeFromString(forwardDriverName);
if (driverName <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown forward <driver name='%s'/> "
"in network %s"),
forwardDriverName, networkName);
@@ -1873,7 +1873,7 @@ virNetworkForwardDefParseXML(const char *networkName,
}
if ((def->ifs[i].type = virNetworkForwardHostdevDeviceTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown address type '%s' in network %s"),
type, networkName);
goto cleanup;
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
index 171cd7c..ea85cff 100644
--- a/src/conf/node_device_conf.c
+++ b/src/conf/node_device_conf.c
@@ -854,7 +854,7 @@ virNodeDevCapNetParseXML(xmlXPathContextPtr ctxt,
int val = virNodeDevNetCapTypeFromString(tmp);
VIR_FREE(tmp);
if (val < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("invalid network type supplied for '%s'"),
def->name);
goto out;
@@ -1166,7 +1166,7 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt,
}
if ((val = virNodeDevCapTypeFromString(tmp)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown capability type '%s'"), tmp);
VIR_FREE(tmp);
goto error;
diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c
index d280df5..30ec094 100644
--- a/src/conf/nwfilter_conf.c
+++ b/src/conf/nwfilter_conf.c
@@ -2319,7 +2319,7 @@ virNWFilterRuleParse(xmlNodePtr node)
}
if ((ret->action = virNWFilterRuleActionTypeFromString(action)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
_("unknown rule action attribute value"));
goto err_exit;
@@ -2333,7 +2333,7 @@ virNWFilterRuleParse(xmlNodePtr node)
}
if ((ret->tt = virNWFilterRuleDirectionTypeFromString(direction)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
"%s",
_("unknown rule direction attribute value"));
goto err_exit;
diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c
index 282bc6e..c3252d1 100644
--- a/src/conf/secret_conf.c
+++ b/src/conf/secret_conf.c
@@ -82,7 +82,7 @@ virSecretDefParseUsage(xmlXPathContextPtr ctxt,
}
type = virSecretUsageTypeTypeFromString(type_str);
if (type < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown secret usage type %s"), type_str);
VIR_FREE(type_str);
return -1;
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
index c18b99b..fb0b4cc 100644
--- a/src/conf/snapshot_conf.c
+++ b/src/conf/snapshot_conf.c
@@ -121,7 +121,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
if (snapshot) {
def->snapshot = virDomainSnapshotLocationTypeFromString(snapshot);
if (def->snapshot <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk snapshot setting '%s'"),
snapshot);
goto cleanup;
@@ -157,7 +157,7 @@ virDomainSnapshotDiskDefParseXML(xmlNodePtr node,
if (driver) {
def->format = virStorageFileFormatTypeFromString(driver);
if (def->format <= 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown disk snapshot driver '%s'"),
driver);
VIR_FREE(driver);
@@ -242,7 +242,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
}
def->state = virDomainSnapshotStateTypeFromString(state);
if (def->state < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid state '%s' in domain snapshot XML"),
state);
goto cleanup;
@@ -282,7 +282,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
if (memorySnapshot) {
def->memory = virDomainSnapshotLocationTypeFromString(memorySnapshot);
if (def->memory <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown memory snapshot setting '%s'"),
memorySnapshot);
goto cleanup;
diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
index ed492cf..e4232e9 100644
--- a/src/conf/storage_conf.c
+++ b/src/conf/storage_conf.c
@@ -527,7 +527,7 @@ virStoragePoolDefParseAuth(xmlXPathContextPtr ctxt,
if ((source->authType =
virStoragePoolAuthTypeTypeFromString(authType)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown auth type '%s'"),
authType);
goto cleanup;
@@ -601,7 +601,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
source->format = options->formatFromString(format);
if (source->format < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown pool format type %s"), format);
VIR_FREE(format);
goto cleanup;
@@ -673,7 +673,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
if ((adapter_type = virXPathString("string(./adapter/@type)", ctxt))) {
if ((source->adapter.type =
virStoragePoolSourceAdapterTypeTypeFromString(adapter_type)) <= 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unknown pool adapter type '%s'"),
adapter_type);
goto cleanup;
@@ -871,7 +871,7 @@ virStoragePoolDefParseXML(xmlXPathContextPtr ctxt)
}
if ((ret->type = virStoragePoolTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown storage pool type %s"), type);
goto error;
}
@@ -1305,7 +1305,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
type = virXPathString("string(./@type)", ctxt);
if (type) {
if ((ret->type = virStorageVolTypeFromString(type)) < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown volume type '%s'"), type);
goto error;
}
@@ -1340,7 +1340,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
ret->target.format = (options->formatFromString)(format);
if (ret->target.format < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown volume format type %s"), format);
VIR_FREE(format);
goto error;
@@ -1370,7 +1370,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
ret->backingStore.format = (options->formatFromString)(format);
if (ret->backingStore.format < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown volume format type %s"), format);
VIR_FREE(format);
goto error;
@@ -1408,7 +1408,7 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
int f = options->featureFromString((const char*)nodes[i]->name);
if (f < 0) {
- virReportError(VIR_ERR_XML_ERROR, _("unsupported feature %s"),
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported feature %s"),
(const char*)nodes[i]->name);
goto error;
}
diff --git a/src/conf/storage_encryption_conf.c b/src/conf/storage_encryption_conf.c
index 86b5f96..c2fafe3 100644
--- a/src/conf/storage_encryption_conf.c
+++ b/src/conf/storage_encryption_conf.c
@@ -91,7 +91,7 @@ virStorageEncryptionSecretParse(xmlXPathContextPtr ctxt,
}
type = virStorageEncryptionSecretTypeTypeFromString(type_str);
if (type < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown volume encryption secret type %s"),
type_str);
VIR_FREE(type_str);
@@ -144,7 +144,7 @@ virStorageEncryptionParseXML(xmlXPathContextPtr ctxt)
}
format = virStorageEncryptionFormatTypeFromString(format_str);
if (format < 0) {
- virReportError(VIR_ERR_XML_ERROR,
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unknown volume encryption format type %s"),
format_str);
VIR_FREE(format_str);
--
1.8.4.2
11 years, 5 months