Re: [PATCHv3 11/16] Wrong place for virDomainNetIpsFormat

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

 



On Fri, Oct 10, 2014 at 02:04:03PM +0200, Cédric Bosdonnat wrote:
> ---
>  src/conf/domain_conf.c | 60 +++++++++++++++++++++++++-------------------------
>  1 file changed, 30 insertions(+), 30 deletions(-)

Could you update the commit message to be a little more explicit about
why it is in the wrong place currently.

> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 41d5e7a..990620f 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -16650,6 +16650,36 @@ virDomainFSDefFormat(virBufferPtr buf,
>      return 0;
>  }
>  
> +static void
> +virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
> +{
> +    size_t i;
> +
> +    /* Output IP addresses */
> +    for (i = 0; i < nips; i++) {
> +        virBufferAsprintf(buf, "<ip address='%s'",
> +                          ips[i]->address);
> +        if (ips[i]->prefix != 0)
> +            virBufferAsprintf(buf, " prefix='%u'", ips[i]->prefix);
> +        virBufferAddLit(buf, "/>\n");
> +    }
> +}
> +
> +static void
> +virDomainNetGatewayFormat(virBufferPtr buf,
> +                          const char* gateway_ipv4,
> +                          const char* gateway_ipv6)
> +{
> +    if (gateway_ipv4 || gateway_ipv6) {
> +        virBufferAddLit(buf, "<gateway");
> +        if (gateway_ipv4)
> +            virBufferAsprintf(buf, " ipv4='%s'", gateway_ipv4);
> +        if (gateway_ipv6)
> +            virBufferAsprintf(buf, " ipv6='%s'", gateway_ipv6);
> +        virBufferAddLit(buf, "/>\n");
> +    }
> +}
> +
>  static int
>  virDomainHostdevDefFormatSubsys(virBufferPtr buf,
>                                  virDomainHostdevDefPtr def,
> @@ -16772,36 +16802,6 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf,
>      return 0;
>  }
>  
> -static void
> -virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
> -{
> -    size_t i;
> -
> -    /* Output IP addresses */
> -    for (i = 0; i < nips; i++) {
> -        virBufferAsprintf(buf, "<ip address='%s'",
> -                          ips[i]->address);
> -        if (ips[i]->prefix != 0)
> -            virBufferAsprintf(buf, " prefix='%u'", ips[i]->prefix);
> -        virBufferAddLit(buf, "/>\n");
> -    }
> -}
> -
> -static void
> -virDomainNetGatewayFormat(virBufferPtr buf,
> -                          const char* gateway_ipv4,
> -                          const char* gateway_ipv6)
> -{
> -    if (gateway_ipv4 || gateway_ipv6) {
> -        virBufferAddLit(buf, "<gateway");
> -        if (gateway_ipv4)
> -            virBufferAsprintf(buf, " ipv4='%s'", gateway_ipv4);
> -        if (gateway_ipv6)
> -            virBufferAsprintf(buf, " ipv6='%s'", gateway_ipv6);
> -        virBufferAddLit(buf, "/>\n");
> -    }
> -}
> -
>  static int
>  virDomainHostdevDefFormatCaps(virBufferPtr buf,
>                                virDomainHostdevDefPtr def)

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]