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

Ján Tomko jtomko at redhat.com
Mon May 28 13:55:30 UTC 2018


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 at redhat.com>
>---
> 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 at redhat.com

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180528/75f15518/attachment-0001.sig>


More information about the libvir-list mailing list