[libvirt] [PATCH 4/9] conf: eliminate outmoded/odd indent method from interface xml

Eric Blake eblake at redhat.com
Thu Mar 6 18:39:57 UTC 2014


On 03/06/2014 08:24 AM, Laine Stump wrote:
> These format functions needed the ability to be indented by an
> arbitrary amount, but were written before the introduction of
> virBufferAdjustIndent(). They instead used the much more clunky method
> of adding a "level" arg to every format function, and padding with
> spaces using the "%*s" printf format specifier (giving it the level,
> and "", which has the effect of adding level spaces to the output).
> 
> While eliminating the hardcoded indentation in other xml, I decided it
> was finally time to also modernize the interface formatter code to
> make it more consistent.
> ---
>  src/conf/interface_conf.c | 137 ++++++++++++++++++++++------------------------
>  1 file changed, 64 insertions(+), 73 deletions(-)

About time!

> 
> diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
> index 8053307..65ab2fa 100644
> --- a/src/conf/interface_conf.c
> +++ b/src/conf/interface_conf.c
> @@ -1,7 +1,7 @@
>  /*
>   * interface_conf.c: interfaces XML handling
>   *
> - * Copyright (C) 2006-2010, 2013 Red Hat, Inc.
> + * Copyright (C) 2006-2010, 2013, 2014 Red Hat, Inc.

Per git log, Red Hat people touched this file in 2011 and 2012, so you
could simplify this to 2006-2014.

ACK.  Again, it's nice that 'make check' has tests of our generated
output files, so that we cover most (if not all) of these changes to
prove that the output is unchanged.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140306/6e9f4367/attachment-0001.sig>


More information about the libvir-list mailing list