Skip to contentSkip to conversation

net: convert qemu_log to error_report

PATCH Superseded Paolo Bonzini 3 participants 3 messages Nov 13, 2015 Networking

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: convert qemu_log to error_report

Ensure that the error is printed with the proper timestamp.

---
 net/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dump.c +1 -1
index dd0555f..ab71ffc 100644
@@ -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;
     }
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Paolo Bonzini

Ensure that the error is printed with the proper timestamp.

---
 net/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
net/dump.c +1 -1
index dd0555f..ab71ffc 100644
@@ -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;
     }
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 12 lines · Paolo Bonzini

Ensure that the error is printed with the proper timestamp.

---
 net/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dump.c +0 -0
index dd0555f..ab71ffc 100644

net/dump.c static ssize_t dump_receive_iov(DumpState *s, const struct iovec *iov, int cnt) · line 90

Quoted 8 lines
net/dump.c +1 -1
@@ -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: