qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] fix wrong output with 'info chardev' for tcp so


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH] fix wrong output with 'info chardev' for tcp socket.
Date: Fri, 22 Feb 2013 00:29:44 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Icedove/17.0

22.02.2013 00:20, Serge E. Hallyn wrote:
> The snprintf format isn't taking into account the new 'left' and
> 'right' variables (for ipv6 []) when placing the ':', which should
> go immediately before the port.

This fixes actual isse (also found by Serge), where `info chardev'
prints `tcp:127.0.0.14444,server,nowait' for a monitor running on port
4444.

This is definitely a stable material (CCed).

Reviewed-by: Michael Tokarev <address@hidden>

Thanks!

/mjt

> Signed-off-by: Serge Hallyn <address@hidden>
> ---
>  qemu-char.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qemu-char.c b/qemu-char.c
> index e4b0f53..3e152e1 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -2482,7 +2482,7 @@ static CharDriverState *qemu_chr_open_socket_fd(int fd, 
> bool do_nodelay,
>          s->do_nodelay = do_nodelay;
>          getnameinfo((struct sockaddr *) &ss, ss_len, host, sizeof(host),
>                      serv, sizeof(serv), NI_NUMERICHOST | NI_NUMERICSERV);
> -        snprintf(chr->filename, 256, "%s:%s:%s%s%s%s",
> +        snprintf(chr->filename, 256, "%s:%s%s%s:%s%s",
>                   is_telnet ? "telnet" : "tcp",
>                   left, host, right, serv,
>                   is_listen ? ",server" : "");
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]