diff mbox

[v1,1/1] char-socket: Don't report TCP socket waiting as an error

Message ID 2b2311b1b070a0b03973e39deccf4682de4a6cd4.1496686997.git.alistair.francis@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alistair Francis June 5, 2017, 6:34 p.m. UTC
When QEMU is waiting for a TCP socket connection it reports that message as
an error. This isn't an error though, so let's change the report to just
use qemu_log().

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---

 chardev/char-socket.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé June 5, 2017, 8:12 p.m. UTC | #1
On 06/05/2017 03:34 PM, Alistair Francis wrote:
> When QEMU is waiting for a TCP socket connection it reports that message as
> an error. This isn't an error though, so let's change the report to just
> use qemu_log().
>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>
>  chardev/char-socket.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/chardev/char-socket.c b/chardev/char-socket.c
> index ccc499cfa1..a9884fa85b 100644
> --- a/chardev/char-socket.c
> +++ b/chardev/char-socket.c
> @@ -27,6 +27,7 @@
>  #include "io/channel-tls.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
> +#include "qemu/log.h"
>  #include "qapi/clone-visitor.h"
>
>  #include "chardev/char-io.h"
> @@ -765,7 +766,7 @@ static int tcp_chr_wait_connected(Chardev *chr, Error **errp)
>       * in TLS and telnet cases, only wait for an accepted socket */
>      while (!s->ioc) {
>          if (s->is_listen) {
> -            error_report("QEMU waiting for connection on: %s",
> +            qemu_log("QEMU waiting for connection on: %s",
>                           chr->filename);
>              qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), true, NULL);
>              tcp_chr_accept(QIO_CHANNEL(s->listen_ioc), G_IO_IN, chr);
>
diff mbox

Patch

diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index ccc499cfa1..a9884fa85b 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket.c
@@ -27,6 +27,7 @@ 
 #include "io/channel-tls.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
+#include "qemu/log.h"
 #include "qapi/clone-visitor.h"
 
 #include "chardev/char-io.h"
@@ -765,7 +766,7 @@  static int tcp_chr_wait_connected(Chardev *chr, Error **errp)
      * in TLS and telnet cases, only wait for an accepted socket */
     while (!s->ioc) {
         if (s->is_listen) {
-            error_report("QEMU waiting for connection on: %s",
+            qemu_log("QEMU waiting for connection on: %s",
                          chr->filename);
             qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), true, NULL);
             tcp_chr_accept(QIO_CHANNEL(s->listen_ioc), G_IO_IN, chr);