From 494d76f823c69f72d72c00a1f2743a4484e669cd Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 14 Jul 2001 00:42:51 +0000 Subject: [PATCH] Added a bit of __comedi_errno initialization --- lib/comedi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/comedi.c b/lib/comedi.c index ccb6d2e..0f9c5c4 100644 --- a/lib/comedi.c +++ b/lib/comedi.c @@ -148,17 +148,26 @@ int comedi_trigger(comedi_t *it,comedi_trig *t) int comedi_command(comedi_t *it,comedi_cmd *t) { - return ioctl(it->fd,COMEDI_CMD,t); + int ret; + ret = ioctl(it->fd,COMEDI_CMD,t); + __comedi_errno = errno; + return ret; } int comedi_command_test(comedi_t *it,comedi_cmd *t) { - return ioctl(it->fd,COMEDI_CMDTEST,t); + int ret; + ret = ioctl(it->fd,COMEDI_CMDTEST,t); + __comedi_errno = errno; + return ret; } int comedi_do_insnlist(comedi_t *it,comedi_insnlist *il) { - return ioctl(it->fd,COMEDI_INSNLIST,il); + int ret; + ret = ioctl(it->fd,COMEDI_INSNLIST,il); + __comedi_errno = errno; + return ret; } int comedi_do_insn(comedi_t *it,comedi_insn *insn) -- 2.26.2