[libvirt] [PATCH] qemu: fix guestfwd chardev option back how it was

Ján Tomko jtomko at redhat.com
Thu Jun 26 14:48:23 UTC 2014


On 06/26/2014 04:36 PM, Martin Kletzander wrote:
> Since commit d86c876a66e320b55220d00113027c9ad6199cff we are using
> guestfwd=tcp:IP:PORT,chardev=ID for guestfwd specification, however,
> that has not changed in qemu, so guestfwd does not work since.
> 
> Apart from that, guestfwd is not working with older qemu that doesn't
> have QEMU_CAPS_DEVICE.
> 
> Both regressions exist since late 2009 and nobody found that (until
> now), so I'm only fixing the first one.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1112066
> 
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  src/qemu/qemu_command.c                                   | 2 +-
>  tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.args | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

ACK

> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 93d303e..5074aa1 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -9186,7 +9186,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
>          port = virSocketAddrGetPort(chr->target.addr);
> 
>          if (virAsprintf(deviceStr,
> -                        "user,guestfwd=tcp:%s:%i,chardev=char%s,id=user-%s",
> +                        "user,guestfwd=tcp:%s:%i-chardev:char%s,id=user-%s",
>                          addr, port, chr->info.alias, chr->info.alias) < 0) {
>              virReportOOMError();

The OOM error is redundant here and right above it in
qemuBuildParallelChrDeviceStr.

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


More information about the libvir-list mailing list