Commit 73c3bc57 authored by Federico Vaga's avatar Federico Vaga

wrtd:tools: show read errors

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>


NOTE
This commit has been created by `git subtree` on the Mock Turtle repository
on tag mock-turtle-2.0

This commit will not compile
parent 3e995526
......@@ -65,8 +65,11 @@ static void *logging_thread(void *arg)
while (i < th_data->n_read || th_data->n_read == 0) {
count = wrtd_log_read(hlog, &log, 1, -1);
if (count <= 0)
if (count <= 0) {
fprintf(stderr, "Cannot read message: %s\n",
wrtd_strerror(errno));
break;
}
fprintf(stdout, "Device %s\n",
th_data->core == WRTD_CORE_IN ? "input" : "output");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment