[libvirt] [PATCH v1 12/14] conf: Format alias even for inactive XMLs

Michal Privoznik posted 14 patches 7 years, 6 months ago
There is a newer version of this series
[libvirt] [PATCH v1 12/14] conf: Format alias even for inactive XMLs
Posted by Michal Privoznik 7 years, 6 months ago
We need to format alias even for inactive XMLs since that's the
way how users are going to identify their devices.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/conf/domain_conf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cb80939af..7efbf55b0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5916,10 +5916,9 @@ virDomainDeviceInfoFormat(virBufferPtr buf,
 
         virBufferAddLit(buf, "/>\n");
     }
-    if (info->alias &&
-        !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)) {
+
+    if (info->alias)
         virBufferAsprintf(buf, "<alias name='%s'/>\n", info->alias);
-    }
 
     if (info->mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB) {
         virBufferAsprintf(buf, "<master startport='%d'/>\n",
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list