[libvirt] [PATCH v2 0/3] introduce virBufferEscapeN and fix escape bug

Pavel Hrdina posted 3 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1487881719.git.phrdina@redhat.com
src/libvirt_private.syms                           |   2 +
src/qemu/qemu_command.c                            |   6 +-
src/util/virbuffer.c                               | 101 +++++++++++++++++++++
src/util/virbuffer.h                               |   2 +
src/util/virqemu.c                                 |  17 ++++
src/util/virqemu.h                                 |   1 +
.../qemuxml2argvdata/qemuxml2argv-name-escape.args |   5 +-
.../qemuxml2argvdata/qemuxml2argv-name-escape.xml  |   7 +-
tests/qemuxml2argvtest.c                           |   3 +-
tests/virbuftest.c                                 |  41 +++++++++
10 files changed, 179 insertions(+), 6 deletions(-)
[libvirt] [PATCH v2 0/3] introduce virBufferEscapeN and fix escape bug
Posted by Pavel Hrdina 7 years, 1 month ago
I've dropped the STRCAT patches in v2.  The whole purpose of the STRCAT was
to avoid calling *strcspn* several times but it was probably a bad call.
Now we call that function for each pair but if no escaping is required
we at least don't allocate the structure for that pair and later in the
*virBufferEscapeN* we only iterate over the pairs that will escape at least
one character.

Pavel Hrdina (3):
  util: virbuffer: introduce virBufferEscapeN
  util: virqemu: introduce virQEMUBuildBufferEscape
  qemu: properly escape socket path for graphics

 src/libvirt_private.syms                           |   2 +
 src/qemu/qemu_command.c                            |   6 +-
 src/util/virbuffer.c                               | 101 +++++++++++++++++++++
 src/util/virbuffer.h                               |   2 +
 src/util/virqemu.c                                 |  17 ++++
 src/util/virqemu.h                                 |   1 +
 .../qemuxml2argvdata/qemuxml2argv-name-escape.args |   5 +-
 .../qemuxml2argvdata/qemuxml2argv-name-escape.xml  |   7 +-
 tests/qemuxml2argvtest.c                           |   3 +-
 tests/virbuftest.c                                 |  41 +++++++++
 10 files changed, 179 insertions(+), 6 deletions(-)

-- 
2.11.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 0/3] introduce virBufferEscapeN and fix escape bug
Posted by Ján Tomko 7 years, 1 month ago
On Thu, Feb 23, 2017 at 09:36:15PM +0100, Pavel Hrdina wrote:
>I've dropped the STRCAT patches in v2.  The whole purpose of the STRCAT was
>to avoid calling *strcspn* several times but it was probably a bad call.
>Now we call that function for each pair but if no escaping is required
>we at least don't allocate the structure for that pair and later in the
>*virBufferEscapeN* we only iterate over the pairs that will escape at least
>one character.
>
>Pavel Hrdina (3):
>  util: virbuffer: introduce virBufferEscapeN
>  util: virqemu: introduce virQEMUBuildBufferEscape
>  qemu: properly escape socket path for graphics
>
> src/libvirt_private.syms                           |   2 +
> src/qemu/qemu_command.c                            |   6 +-
> src/util/virbuffer.c                               | 101 +++++++++++++++++++++
> src/util/virbuffer.h                               |   2 +
> src/util/virqemu.c                                 |  17 ++++
> src/util/virqemu.h                                 |   1 +
> .../qemuxml2argvdata/qemuxml2argv-name-escape.args |   5 +-
> .../qemuxml2argvdata/qemuxml2argv-name-escape.xml  |   7 +-
> tests/qemuxml2argvtest.c                           |   3 +-
> tests/virbuftest.c                                 |  41 +++++++++
> 10 files changed, 179 insertions(+), 6 deletions(-)
>

ACK series

Jan
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 0/3] introduce virBufferEscapeN and fix escape bug
Posted by Pavel Hrdina 7 years, 1 month ago
On Fri, Feb 24, 2017 at 11:53:29AM +0100, Ján Tomko wrote:
> On Thu, Feb 23, 2017 at 09:36:15PM +0100, Pavel Hrdina wrote:
> >I've dropped the STRCAT patches in v2.  The whole purpose of the STRCAT was
> >to avoid calling *strcspn* several times but it was probably a bad call.
> >Now we call that function for each pair but if no escaping is required
> >we at least don't allocate the structure for that pair and later in the
> >*virBufferEscapeN* we only iterate over the pairs that will escape at least
> >one character.
> >
> >Pavel Hrdina (3):
> >  util: virbuffer: introduce virBufferEscapeN
> >  util: virqemu: introduce virQEMUBuildBufferEscape
> >  qemu: properly escape socket path for graphics
> >
> > src/libvirt_private.syms                           |   2 +
> > src/qemu/qemu_command.c                            |   6 +-
> > src/util/virbuffer.c                               | 101 +++++++++++++++++++++
> > src/util/virbuffer.h                               |   2 +
> > src/util/virqemu.c                                 |  17 ++++
> > src/util/virqemu.h                                 |   1 +
> > .../qemuxml2argvdata/qemuxml2argv-name-escape.args |   5 +-
> > .../qemuxml2argvdata/qemuxml2argv-name-escape.xml  |   7 +-
> > tests/qemuxml2argvtest.c                           |   3 +-
> > tests/virbuftest.c                                 |  41 +++++++++
> > 10 files changed, 179 insertions(+), 6 deletions(-)
> >
> 
> ACK series
> 
> Jan

Thanks, I've fixed the issues in patch 01 and pushed it.

Pavel

> --
> libvir-list mailing list
> libvir-list@redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list