[libvirt] [PATCHv2 07/13] snapshot: simplify indentation of sysinfo

Peter Krempa pkrempa at redhat.com
Thu Oct 20 10:14:57 UTC 2011


On 09/29/2011 06:22 PM, Eric Blake wrote:
> The improvements to virBuffer, along with a paradigm shift to pass
> the original buffer through rather than creating a second buffer,
> allow us to shave off quite a few lines of code.
>
> * src/util/sysinfo.h (virSysinfoFormat): Alter signature.
> * src/util/sysinfo.c (virSysinfoFormat, virSysinfoBIOSFormat)
> (virSysinfoSystemFormat, virSysinfoProcessorFormat)
> (virSysinfoMemoryFormat): Change indentation parameter.
> * src/conf/domain_conf.c (virDomainSysinfoDefFormat): Adjust
> caller.
> * src/qemu/qemu_driver.c (qemuGetSysinfo): Likewise.
> ---
>   src/conf/domain_conf.c |   12 +-
>   src/qemu/qemu_driver.c |    9 +-
>   src/util/sysinfo.c     |  399 ++++++++++++++++--------------------------------
>   src/util/sysinfo.h     |    3 +-
>   4 files changed, 147 insertions(+), 276 deletions(-)
>
I'd squash in the attached patch, but it's not necessary as it gets rid 
of non automatic indentation whitespace, but makes the code look cleaner :)

ACK, virBufferEscapeString nicely simplifies the code :)

Peter


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sysinfo_autoindent.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111020/6241232c/attachment-0001.ksh>


More information about the libvir-list mailing list