[libvirt] [PATCH v2 11/11] conf: parse hostdev missing flag

Nikolay Shirokovskiy posted 11 patches 6 years, 5 months ago
There is a newer version of this series
[libvirt] [PATCH v2 11/11] conf: parse hostdev missing flag
Posted by Nikolay Shirokovskiy 6 years, 5 months ago
We want to keep this flag across libvirtd restarts.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
---
 src/conf/domain_conf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c200af050c..862ca4bd3a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7541,6 +7541,7 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
     VIR_AUTOFREE(char *) startupPolicy = NULL;
     VIR_AUTOFREE(char *) autoAddress = NULL;
     VIR_AUTOFREE(char *) deleteAction = NULL;
+    VIR_AUTOFREE(char *) missing = NULL;
 
     if ((startupPolicy = virXMLPropString(node, "startupPolicy"))) {
         def->startupPolicy =
@@ -7570,6 +7571,11 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
         }
     }
 
+    if ((missing = virXMLPropString(node, "missing"))) {
+        if (STREQ(missing, "yes"))
+            def->missing = true;
+    }
+
     /* Product can validly be 0, so we need some extra help to determine
      * if it is uninitialized*/
     got_product = false;
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 11/11] conf: parse hostdev missing flag
Posted by Daniel Henrique Barboza 6 years, 4 months ago

On 9/9/19 8:33 AM, Nikolay Shirokovskiy wrote:
> We want to keep this flag across libvirtd restarts.
>
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
> ---

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>

>   src/conf/domain_conf.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index c200af050c..862ca4bd3a 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -7541,6 +7541,7 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
>       VIR_AUTOFREE(char *) startupPolicy = NULL;
>       VIR_AUTOFREE(char *) autoAddress = NULL;
>       VIR_AUTOFREE(char *) deleteAction = NULL;
> +    VIR_AUTOFREE(char *) missing = NULL;
>   
>       if ((startupPolicy = virXMLPropString(node, "startupPolicy"))) {
>           def->startupPolicy =
> @@ -7570,6 +7571,11 @@ virDomainHostdevSubsysUSBDefParseXML(xmlNodePtr node,
>           }
>       }
>   
> +    if ((missing = virXMLPropString(node, "missing"))) {
> +        if (STREQ(missing, "yes"))
> +            def->missing = true;
> +    }
> +
>       /* Product can validly be 0, so we need some extra help to determine
>        * if it is uninitialized*/
>       got_product = false;

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