Message ID | 4c63c416af7bffe388d399132a006355366a3cfb.1499276048.git.alistair.francis@xilinx.com |
---|---|
State | New |
Headers | show |
On 05.07.2017 19:36, Alistair Francis wrote: > When QEMU is waiting for a TCP socket connection it reports that message as > an error. This isn't an error it is just information so let's change the > report to use info_report() instead. > > Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> > --- > > chardev/char-socket.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > index ccc499cfa1..a050a686ea 100644 > --- a/chardev/char-socket.c > +++ b/chardev/char-socket.c > @@ -765,8 +765,8 @@ 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", > - chr->filename); > + info_report("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); > qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), false, NULL); > Reviewed-by: Thomas Huth <thuth@redhat.com> And in case you also want to add some warn_reports, I suggest to do a grep -r "error_report.*[Ww]arning:" * in the sources - there seem to be quite a lot of error_reports that are rather a warning instead. Thomas
Thomas Huth <thuth@redhat.com> writes: > On 05.07.2017 19:36, Alistair Francis wrote: >> When QEMU is waiting for a TCP socket connection it reports that message as >> an error. This isn't an error it is just information so let's change the >> report to use info_report() instead. >> >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> >> --- >> >> chardev/char-socket.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/chardev/char-socket.c b/chardev/char-socket.c >> index ccc499cfa1..a050a686ea 100644 >> --- a/chardev/char-socket.c >> +++ b/chardev/char-socket.c >> @@ -765,8 +765,8 @@ 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", >> - chr->filename); >> + info_report("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); >> qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), false, NULL); >> > > Reviewed-by: Thomas Huth <thuth@redhat.com> > > And in case you also want to add some warn_reports, I suggest to do a > > grep -r "error_report.*[Ww]arning:" * > > in the sources - there seem to be quite a lot of error_reports that are > rather a warning instead. Replace "in case you also want to" by "please do" --- I dislike adding infrastructure without users, and I dislike adding new ways to do things without getting rid of the old ways even more.
diff --git a/chardev/char-socket.c b/chardev/char-socket.c index ccc499cfa1..a050a686ea 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -765,8 +765,8 @@ 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", - chr->filename); + info_report("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); qio_channel_set_blocking(QIO_CHANNEL(s->listen_ioc), false, NULL);
When QEMU is waiting for a TCP socket connection it reports that message as an error. This isn't an error it is just information so let's change the report to use info_report() instead. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> --- chardev/char-socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)