Message ID | 55b6931c368b67ece2f0bd7d8e83092727df1e3c.1498596157.git.alistair.francis@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change the report to > use warning_report() instead. Hi Alistair, Isn't this more like an informational message rather than a warning? A warning would indicate to me that something unexpected and perhaps wrong happened. In this case, there's nothing wrong going on. We may need more classes, like 'info:' and/or maybe others... Cheers, Edgar > > Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> > --- > > chardev/char-socket.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/chardev/char-socket.c b/chardev/char-socket.c > index ccc499cfa1..5a56628e74 100644 > --- a/chardev/char-socket.c > +++ b/chardev/char-socket.c > @@ -765,7 +765,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", > + warning_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); > -- > 2.11.0 > >
On Tue, Jun 27, 2017 at 2:10 PM, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote: > On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change the report to >> use warning_report() instead. > > Hi Alistair, > > Isn't this more like an informational message rather than a warning? > > A warning would indicate to me that something unexpected and perhaps wrong happened. > In this case, there's nothing wrong going on. > > We may need more classes, like 'info:' and/or maybe others... Hey Edgar, That is a good point. I can add a info_report() as well then that copies the warning_report() function but prefixes with 'info: '. Thanks, Alistair > > Cheers, > Edgar > > > >> >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> >> --- >> >> chardev/char-socket.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/chardev/char-socket.c b/chardev/char-socket.c >> index ccc499cfa1..5a56628e74 100644 >> --- a/chardev/char-socket.c >> +++ b/chardev/char-socket.c >> @@ -765,7 +765,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", >> + warning_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); >> -- >> 2.11.0 >> >>
On Tue, Jun 27, 2017 at 05:17:58PM -0700, Alistair Francis wrote: > On Tue, Jun 27, 2017 at 2:10 PM, Edgar E. Iglesias > <edgar.iglesias@gmail.com> wrote: > > On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change the report to > >> use warning_report() instead. > > > > Hi Alistair, > > > > Isn't this more like an informational message rather than a warning? > > > > A warning would indicate to me that something unexpected and perhaps wrong happened. > > In this case, there's nothing wrong going on. > > > > We may need more classes, like 'info:' and/or maybe others... > > Hey Edgar, > > That is a good point. I can add a info_report() as well then that > copies the warning_report() function but prefixes with 'info: '. Hi, Yes, or another way is to pass the class of message as an argument, e.g like qemu_log_mask does it. Best regards, Edgar > > Thanks, > Alistair > > > > > Cheers, > > Edgar > > > > > > > >> > >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> > >> --- > >> > >> chardev/char-socket.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/chardev/char-socket.c b/chardev/char-socket.c > >> index ccc499cfa1..5a56628e74 100644 > >> --- a/chardev/char-socket.c > >> +++ b/chardev/char-socket.c > >> @@ -765,7 +765,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", > >> + warning_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); > >> -- > >> 2.11.0 > >> > >>
On Tue, Jun 27, 2017 at 11:15 PM, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote: > On Tue, Jun 27, 2017 at 05:17:58PM -0700, Alistair Francis wrote: >> On Tue, Jun 27, 2017 at 2:10 PM, Edgar E. Iglesias >> <edgar.iglesias@gmail.com> wrote: >> > On Tue, Jun 27, 2017 at 01:45:48PM -0700, 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 a warnign so let's change the report to >> >> use warning_report() instead. >> > >> > Hi Alistair, >> > >> > Isn't this more like an informational message rather than a warning? >> > >> > A warning would indicate to me that something unexpected and perhaps wrong happened. >> > In this case, there's nothing wrong going on. >> > >> > We may need more classes, like 'info:' and/or maybe others... >> >> Hey Edgar, >> >> That is a good point. I can add a info_report() as well then that >> copies the warning_report() function but prefixes with 'info: '. > > > Hi, > > Yes, or another way is to pass the class of message as an argument, > e.g like qemu_log_mask does it. Ah! That is a good idea. Something like this: report(ERROR, "message, ...) report(WARN, "message, ...) report(INFO, "message, ...) which gets converted to adding prefixes to the message. Thanks, Alistair > > Best regards, > Edgar > > > > >> >> Thanks, >> Alistair >> >> > >> > Cheers, >> > Edgar >> > >> > >> > >> >> >> >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> >> >> --- >> >> >> >> chardev/char-socket.c | 2 +- >> >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> >> >> diff --git a/chardev/char-socket.c b/chardev/char-socket.c >> >> index ccc499cfa1..5a56628e74 100644 >> >> --- a/chardev/char-socket.c >> >> +++ b/chardev/char-socket.c >> >> @@ -765,7 +765,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", >> >> + warning_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); >> >> -- >> >> 2.11.0 >> >> >> >> >
diff --git a/chardev/char-socket.c b/chardev/char-socket.c index ccc499cfa1..5a56628e74 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -765,7 +765,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", + warning_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);
When QEMU is waiting for a TCP socket connection it reports that message as an error. This isn't an error it is a warnign so let's change the report to use warning_report() instead. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> --- chardev/char-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)