[PATCH 20/21] domain_conf.c: use VIR_ERR_CONFIG_UNSUPPORTED in post parse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some occurrences in post parse functions of domain_conf.c are
using VIR_ERR_XML_ERROR. Use VIR_ERR_CONFIG_UNSUPPORTED instead
since these errors might not be related to a XML use case.

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 src/conf/domain_conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b794611b1e..c99c1b60d4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5266,15 +5266,15 @@ virDomainDiskDefPostParse(virDomainDiskDefPtr disk,
     if (virStorageSourceGetActualType(disk->src) != VIR_STORAGE_TYPE_NETWORK &&
         disk->src->protocol != VIR_STORAGE_NET_PROTOCOL_RBD) {
         if (disk->src->snapshot) {
-            virReportError(VIR_ERR_XML_ERROR, "%s",
-                           _("<snapshot> element is currently supported "
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("'snapshot' is currently supported "
                              "only with 'rbd' disks"));
             return -1;
         }
 
         if (disk->src->configFile) {
-            virReportError(VIR_ERR_XML_ERROR, "%s",
-                           _("<config> element is currently supported "
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("'config' is currently supported "
                              "only with 'rbd' disks"));
             return -1;
         }
@@ -5373,7 +5373,7 @@ virDomainControllerDefPostParse(virDomainControllerDefPtr cdev)
         cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI &&
         cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL &&
         cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL) {
-        virReportError(VIR_ERR_XML_ERROR, "%s",
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("'iothread' attribute only supported for "
                          "virtio scsi controllers"));
         return -1;
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux