]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: add boot order to filesystem
authorJán Tomko <jtomko@redhat.com>
Tue, 5 Jan 2021 18:39:46 +0000 (19:39 +0100)
committerJán Tomko <jtomko@redhat.com>
Fri, 29 Jan 2021 13:34:14 +0000 (14:34 +0100)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
tests/qemuxml2argvdata/vhost-user-fs-hugepages.xml

index 232587e69005a59cdc16ff47f69afe27d0d2e436..7bab818bc96cb9c47c2dc857d232f80a01623875 100644 (file)
               <empty/>
             </element>
           </optional>
+          <optional>
+            <ref name="deviceBoot"/>
+          </optional>
           <optional>
             <ref name="alias"/>
           </optional>
index 25f405625be49235558ac502239cd9be1fe4bae1..c16036f5d8ff421a5ea3d3c9d17f278706f709ff 100644 (file)
@@ -10298,7 +10298,8 @@ virDomainFSDefParseXML(virDomainXMLOptionPtr xmlopt,
     def->src->path = g_steal_pointer(&source);
     def->dst = g_steal_pointer(&target);
 
-    if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info, flags) < 0)
+    if (virDomainDeviceInfoParseXML(xmlopt, node, &def->info,
+                                    flags | VIR_DOMAIN_DEF_PARSE_ALLOW_BOOT) < 0)
         goto error;
 
     return def;
@@ -24858,7 +24859,7 @@ virDomainFSDefFormat(virBufferPtr buf,
     if (def->readonly)
         virBufferAddLit(buf, "<readonly/>\n");
 
-    virDomainDeviceInfoFormat(buf, &def->info, flags);
+    virDomainDeviceInfoFormat(buf, &def->info, flags | VIR_DOMAIN_DEF_FORMAT_ALLOW_BOOT);
 
     if (def->space_hard_limit)
         virBufferAsprintf(buf, "<space_hard_limit unit='bytes'>"
index e9982150c7d65dec04daf3546d2eeb723b1f52eb..3f130dd152c9ef74afd2d6514829656ec40861bb 100644 (file)
@@ -66,6 +66,7 @@
       <binary path='/usr/libexec/virtiofsd'/>
       <source dir='/path'/>
       <target dir='mount_tag'/>
+      <boot order='2'/>
       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
     </filesystem>
     <input type='mouse' bus='ps2'/>