* [Xenomai] [PATCH] demo: cross-link: Properly handle ioctl error
@ 2016-02-22 21:25 Michael Welling
2016-02-22 21:31 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Michael Welling @ 2016-02-22 21:25 UTC (permalink / raw)
To: xenomai, Gilles Chanteperdrix, Jan Kiszka, mwelling
Update cross-link demo to properly report ioctl errors.
Signed-off-by: Michael Welling <mwelling@ieee.org>
---
demo/alchemy/cobalt/cross-link.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/demo/alchemy/cobalt/cross-link.c b/demo/alchemy/cobalt/cross-link.c
index 8c0f53f..f050524 100644
--- a/demo/alchemy/cobalt/cross-link.c
+++ b/demo/alchemy/cobalt/cross-link.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
+#include <errno.h>
#include <sys/mman.h>
#include <alchemy/task.h>
#include <alchemy/timer.h>
@@ -199,6 +200,7 @@ static void read_task_proc(void *arg)
/* waiting for event */
err = ioctl(read_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event);
if (err) {
+ err = -errno;
printf(RTASK_PREFIX
"error on RTSER_RTIOC_WAIT_EVENT, %s\n",
strerror(-err));
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-22 21:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 21:25 [Xenomai] [PATCH] demo: cross-link: Properly handle ioctl error Michael Welling
2016-02-22 21:31 ` Gilles Chanteperdrix
2016-02-22 21:33 ` Michael Welling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.