trace-cmd listen: Add better output on error of connections
Some of the errors that happen when a client connects to a server have
ambiguous error messages. Clean them up a little.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
diff --git a/trace-listen.c b/trace-listen.c
index bd4c273..cfb0f14 100644
--- a/trace-listen.c
+++ b/trace-listen.c
@@ -240,7 +240,7 @@
if (r < 0) {
if (errno == EINTR)
break;
- pdie("reading client");
+ pdie("reading pages from client");
}
if (!r)
break;
@@ -558,8 +558,10 @@
if (proto_ver == V2_PROTOCOL) {
/* send set of port numbers to the client */
- if (tracecmd_msg_send_port_array(fd, cpus, port_array) < 0)
+ if (tracecmd_msg_send_port_array(fd, cpus, port_array) < 0) {
+ plog("Failed sending port array\n");
goto out_free;
+ }
} else {
/* send the client a comma deliminated set of port numbers */
for (cpu = 0; cpu < cpus; cpu++) {