qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] net: convert qemu_log to error_report
@ 2015-11-13 12:58 Paolo Bonzini
  2015-11-13 14:54 ` Eric Blake
  2015-11-13 16:44 ` Thomas Huth
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-11-13 12:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Ensure that the error is printed with the proper timestamp.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 net/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dump.c b/net/dump.c
index dd0555f..ab71ffc 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -84,7 +84,7 @@ static ssize_t dump_receive_iov(DumpState *s, const struct iovec *iov, int cnt)
     cnt = iov_copy(&dumpiov[1], cnt, iov, cnt, 0, caplen);
 
     if (writev(s->fd, dumpiov, cnt + 1) != sizeof(hdr) + caplen) {
-        qemu_log("-net dump write error - stop dump\n");
+        error_report("-net dump write error - stop dump");
         close(s->fd);
         s->fd = -1;
     }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] net: convert qemu_log to error_report
  2015-11-13 12:58 [Qemu-devel] [PATCH] net: convert qemu_log to error_report Paolo Bonzini
@ 2015-11-13 14:54 ` Eric Blake
  2015-11-13 16:44 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2015-11-13 14:54 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On 11/13/2015 05:58 AM, Paolo Bonzini wrote:
> Ensure that the error is printed with the proper timestamp.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  net/dump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/net/dump.c b/net/dump.c
> index dd0555f..ab71ffc 100644
> --- a/net/dump.c
> +++ b/net/dump.c
> @@ -84,7 +84,7 @@ static ssize_t dump_receive_iov(DumpState *s, const struct iovec *iov, int cnt)
>      cnt = iov_copy(&dumpiov[1], cnt, iov, cnt, 0, caplen);
>  
>      if (writev(s->fd, dumpiov, cnt + 1) != sizeof(hdr) + caplen) {
> -        qemu_log("-net dump write error - stop dump\n");
> +        error_report("-net dump write error - stop dump");
>          close(s->fd);
>          s->fd = -1;
>      }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] net: convert qemu_log to error_report
  2015-11-13 12:58 [Qemu-devel] [PATCH] net: convert qemu_log to error_report Paolo Bonzini
  2015-11-13 14:54 ` Eric Blake
@ 2015-11-13 16:44 ` Thomas Huth
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2015-11-13 16:44 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial

On 13/11/15 13:58, Paolo Bonzini wrote:
> Ensure that the error is printed with the proper timestamp.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  net/dump.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/dump.c b/net/dump.c
> index dd0555f..ab71ffc 100644
> --- a/net/dump.c
> +++ b/net/dump.c
> @@ -84,7 +84,7 @@ static ssize_t dump_receive_iov(DumpState *s, const struct iovec *iov, int cnt)
>      cnt = iov_copy(&dumpiov[1], cnt, iov, cnt, 0, caplen);
>  
>      if (writev(s->fd, dumpiov, cnt + 1) != sizeof(hdr) + caplen) {
> -        qemu_log("-net dump write error - stop dump\n");
> +        error_report("-net dump write error - stop dump");
>          close(s->fd);
>          s->fd = -1;
>      }

We should maybe also reword that text a little bit, since this code is
now used by the netdev dumping filter, too, so "-net dump" is not the
only user anymore. Anyway, that can also be done with a later patch, so
if you don't want to do this now:

Reviewed-by: Thomas Huth <thuth@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-13 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13 12:58 [Qemu-devel] [PATCH] net: convert qemu_log to error_report Paolo Bonzini
2015-11-13 14:54 ` Eric Blake
2015-11-13 16:44 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).