Re: [PATCH 1/4] conf: domain: Remove code accessing 'bootHash' from the post-parse infrestructure

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

 



On Mon, May 28, 2018 at 11:36:44AM +0200, Peter Krempa wrote:
There is only one block accessing it. Removing it is necessary so that
post parse callbacks can later be invoked after the hypervisor private
data callback so that e.g. qemuCaps are properly filled for the
postparse callbacks.

As the function signature of virDomainDefPostParseInternal does not
differ from virDomainDefPostParse now, the wrapper can be dropped.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
src/conf/domain_conf.c | 62 +++++++++++++++++++-------------------------------
1 file changed, 24 insertions(+), 38 deletions(-)


@@ -20502,9 +20474,23 @@ virDomainDefParseXML(xmlDocPtr xml,
        (def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0)
        goto error;

+    /* Fill in default boot device if none was present */
+    if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
+        if (def->os.nBootDevs > 0 && virHashSize(bootHash) > 0) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("per-device boot elements cannot be used"
+                             " together with os/boot elements"));
+            goto error;
+        }
+
+        if (def->os.nBootDevs == 0 && virHashSize(bootHash) == 0) {
+            def->os.nBootDevs = 1;
+            def->os.bootDevs[0] = VIR_DOMAIN_BOOT_DISK;
+        }
+    }
+

I don't like moving this back into ParseXML.

Can we remove it completely instead?
https://www.redhat.com/archives/libvir-list/2018-May/msg02041.html
cover.1527515594.git.jtomko@xxxxxxxxxx

Jano

Attachment: signature.asc
Description: Digital signature

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

[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