[libvirt] [PATCH 3/4] conf: remove 'bootHash' from the post-parse infrastructure

Ján Tomko posted 4 patches 6 years, 11 months ago
[libvirt] [PATCH 3/4] conf: remove 'bootHash' from the post-parse infrastructure
Posted by Ján Tomko 6 years, 11 months ago
From: Peter Krempa <pkrempa@redhat.com>

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

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/conf/domain_conf.c | 33 +++++++++------------------------
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f087a3680f..6076424bc6 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5010,8 +5010,7 @@ virDomainDefCheckBootOrder(virDomainDefPtr def)
 
 static int
 virDomainDefPostParseCommon(virDomainDefPtr def,
-                            struct virDomainDefPostParseDeviceIteratorData *data,
-                            virHashTablePtr bootHash ATTRIBUTE_UNUSED)
+                            struct virDomainDefPostParseDeviceIteratorData *data)
 {
     size_t i;
 
@@ -5118,13 +5117,12 @@ virDomainDefPostParseCheckFailure(virDomainDefPtr def,
 }
 
 
-static int
-virDomainDefPostParseInternal(virDomainDefPtr def,
-                              virCapsPtr caps,
-                              unsigned int parseFlags,
-                              virDomainXMLOptionPtr xmlopt,
-                              void *parseOpaque,
-                              virHashTablePtr bootHash)
+int
+virDomainDefPostParse(virDomainDefPtr def,
+                      virCapsPtr caps,
+                      unsigned int parseFlags,
+                      virDomainXMLOptionPtr xmlopt,
+                      void *parseOpaque)
 {
     int ret = -1;
     bool localParseOpaque = false;
@@ -5180,7 +5178,7 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
     if (virDomainDefPostParseCheckFailure(def, parseFlags, ret) < 0)
         goto cleanup;
 
-    if ((ret = virDomainDefPostParseCommon(def, &data, bootHash)) < 0)
+    if ((ret = virDomainDefPostParseCommon(def, &data)) < 0)
         goto cleanup;
 
     if (xmlopt->config.assignAddressesCallback) {
@@ -5207,18 +5205,6 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
 }
 
 
-int
-virDomainDefPostParse(virDomainDefPtr def,
-                      virCapsPtr caps,
-                      unsigned int parseFlags,
-                      virDomainXMLOptionPtr xmlopt,
-                      void *parseOpaque)
-{
-    return virDomainDefPostParseInternal(def, caps, parseFlags, xmlopt,
-                                         parseOpaque, NULL);
-}
-
-
 /**
  * virDomainDiskAddressDiskBusCompatibility:
  * @bus: disk bus type
@@ -20562,8 +20548,7 @@ virDomainDefParseXML(xmlDocPtr xml,
         goto error;
 
     /* callback to fill driver specific domain aspects */
-    if (virDomainDefPostParseInternal(def, caps, flags, xmlopt, parseOpaque,
-                                      bootHash) < 0)
+    if (virDomainDefPostParse(def, caps, flags, xmlopt, parseOpaque) < 0)
         goto error;
 
     /* valdiate configuration */
-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] conf: remove 'bootHash' from the post-parse infrastructure
Posted by Peter Krempa 6 years, 11 months ago
On Mon, May 28, 2018 at 15:54:04 +0200, Ján Tomko wrote:
> From: Peter Krempa <pkrempa@redhat.com>
> 
> As the function signature of virDomainDefPostParseInternal does not
> differ from virDomainDefPostParse now, the wrapper can be dropped.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/conf/domain_conf.c | 33 +++++++++------------------------
>  1 file changed, 9 insertions(+), 24 deletions(-)

Implicit ACK. Also please push the rest of the patches from my series
which depend on this when you'll be pushing this.
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] conf: remove 'bootHash' from the post-parse infrastructure
Posted by Ján Tomko 6 years, 11 months ago
On Tue, May 29, 2018 at 09:27:53AM +0200, Peter Krempa wrote:
>On Mon, May 28, 2018 at 15:54:04 +0200, Ján Tomko wrote:
>> From: Peter Krempa <pkrempa@redhat.com>
>>
>> As the function signature of virDomainDefPostParseInternal does not
>> differ from virDomainDefPostParse now, the wrapper can be dropped.
>>
>> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>> Signed-off-by: Ján Tomko <jtomko@redhat.com>
>> ---
>>  src/conf/domain_conf.c | 33 +++++++++------------------------
>>  1 file changed, 9 insertions(+), 24 deletions(-)
>
>Implicit ACK. Also please push the rest of the patches from my series
>which depend on this when you'll be pushing this.

Done.

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