<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 20, 2018 at 10:19 PM, John Ferlan <span dir="ltr"><<a href="mailto:jferlan@redhat.com" target="_blank">jferlan@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On 09/20/2018 09:28 AM, Fabiano Fidêncio wrote:<br>
> Signed-off-by: Fabiano Fidêncio <<a href="mailto:fidencio@redhat.com">fidencio@redhat.com</a>><br>
> ---<br>
>  src/xenconfig/xen_common.c | 18 +++++++++++-------<br>
>  1 file changed, 11 insertions(+), 7 deletions(-)<br>
> <br>
> diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c<br>
> index 9133998cd7..058f35825e 100644<br>
> --- a/src/xenconfig/xen_common.c<br>
> +++ b/src/xenconfig/xen_common.c<br>
> @@ -618,7 +618,6 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def)<br>
>      int val;<br>
>      char *listenAddr = NULL;<br>
>      int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM;<br>
> -    virConfValuePtr list;<br>
>      virDomainGraphicsDefPtr graphics = NULL;<br>
>  <br>
>      if (hvm) {<br>
> @@ -674,17 +673,17 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def)<br>
>      }<br>
>  <br>
>      if (!hvm && def->graphics == NULL) { /* New PV guests use this format */<br>
> -        list = virConfGetValue(conf, "vfb");<br>
> -        if (list && list->type == VIR_CONF_LIST &&<br>
> -            list->list && list->list->type == VIR_CONF_STRING &&<br>
> -            list->list->str) {<br>
> +        VIR_AUTOPTR(virString) vfbs = NULL;<br>
> +        int rc;<br>
> +<br>
> +        if ((rc = virConfGetValueStringList(<wbr>conf, "vfb", false, &vfbs)) == 1) {<br>
>              char vfb[MAX_VFB];<br>
>              char *key = vfb;<br>
>  <br>
> -            if (virStrcpyStatic(vfb, list->list->str) < 0) {<br>
> +            if (virStrcpyStatic(vfb, *vfbs) < 0) {<br>
>                  virReportError(VIR_ERR_<wbr>INTERNAL_ERROR,<br>
>                                 _("VFB %s too big for destination"),<br>
> -                               list->list->str);<br>
> +                               *vfbs);<br>
>                  goto cleanup;<br>
>              }<br>
>  <br>
> @@ -754,6 +753,11 @@ xenParseVfb(virConfPtr conf, virDomainDefPtr def)<br>
>              def->graphics[0] = graphics;<br>
>              def->ngraphics = 1;<br>
>              graphics = NULL;<br>
> +        } else {<br>
> +            rc = xenHandleConfGetValueStringLis<wbr>tErrors(rc,<br>
> +                                                       virGetLastErrorCode());<br>
> +            if (rc < 0)<br>
<br>
</div></div>Based on patch4 change, this is simplified to just:<br>
<br>
            if (<wbr>xenHandleConfGetValueStringLis<wbr>tErrors(rc) < 0)<br>
<br>
I can alter before pushing if you're fine with that.<br>
<br>
Reviewed-by: John Ferlan <<a href="mailto:jferlan@redhat.com">jferlan@redhat.com</a>><br></blockquote><div><br></div><div>Sure!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
John<br>
<br>
> +                goto cleanup;<br>
>          }<br>
>      }<br>
>  <br>
> <br>
</blockquote></div><br></div></div>