[libvirt PATCH 0/3] Clean up usage of virBufferTrim

Ján Tomko posted 3 patches 4 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1580673055.git.jtomko@redhat.com
src/conf/domain_addr.c      |  2 +-
src/conf/domain_conf.c      |  6 ++---
src/cpu/cpu_x86.c           |  6 ++---
src/libvirt_private.syms    |  1 +
src/lxc/lxc_container.c     |  2 +-
src/qemu/qemu_command.c     |  8 +++----
src/rpc/virnetsshsession.c  |  2 +-
src/storage/storage_util.c  |  4 ++--
src/util/virbuffer.c        | 47 +++++++++++++++++++++----------------
src/util/virbuffer.h        |  3 ++-
src/util/virqemu.c          |  2 +-
src/util/virresctrl.c       |  4 ++--
tests/qemublocktest.c       |  2 +-
tests/qemumonitorjsontest.c |  4 ++--
tests/virbuftest.c          | 19 +++++++--------
tools/virsh-domain.c        |  8 +++----
tools/vsh.c                 |  6 ++---
17 files changed, 67 insertions(+), 59 deletions(-)
[libvirt PATCH 0/3] Clean up usage of virBufferTrim
Posted by Ján Tomko 4 years, 2 months ago
Before it was possible to supply a matching suffix, a length of chars
to trim, or both.

However the combination of the two was only used in tests.
Split the function into two.

Ján Tomko (3):
  util: introduce virBufferTrimLen
  Use virBufferTrimLen when applicable
  virBufferTrim: do not accept len

 src/conf/domain_addr.c      |  2 +-
 src/conf/domain_conf.c      |  6 ++---
 src/cpu/cpu_x86.c           |  6 ++---
 src/libvirt_private.syms    |  1 +
 src/lxc/lxc_container.c     |  2 +-
 src/qemu/qemu_command.c     |  8 +++----
 src/rpc/virnetsshsession.c  |  2 +-
 src/storage/storage_util.c  |  4 ++--
 src/util/virbuffer.c        | 47 +++++++++++++++++++++----------------
 src/util/virbuffer.h        |  3 ++-
 src/util/virqemu.c          |  2 +-
 src/util/virresctrl.c       |  4 ++--
 tests/qemublocktest.c       |  2 +-
 tests/qemumonitorjsontest.c |  4 ++--
 tests/virbuftest.c          | 19 +++++++--------
 tools/virsh-domain.c        |  8 +++----
 tools/vsh.c                 |  6 ++---
 17 files changed, 67 insertions(+), 59 deletions(-)

-- 
2.19.2

Re: [libvirt PATCH 0/3] Clean up usage of virBufferTrim
Posted by Peter Krempa 4 years, 2 months ago
On Sun, Feb 02, 2020 at 20:53:01 +0100, Ján Tomko wrote:
> Before it was possible to supply a matching suffix, a length of chars
> to trim, or both.
> 
> However the combination of the two was only used in tests.
> Split the function into two.
> 
> Ján Tomko (3):
>   util: introduce virBufferTrimLen
>   Use virBufferTrimLen when applicable
>   virBufferTrim: do not accept len

Reviewed-by: Peter Krempa <pkrempa@redhat.com>