
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