]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: Format alias even for inactive XMLs
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Oct 2017 11:12:08 +0000 (13:12 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Oct 2017 06:56:55 +0000 (08:56 +0200)
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

index 05e363dbcd4af270b6aba57bf9a01d3b7b823013..77c20c6972653ca7c711dfb535cfac55b04e98d0 100644 (file)
@@ -5962,10 +5962,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",