fixed setting of __comedi_errno after ioctl
This commit is contained in:
parent
60a24ae631
commit
b7de679b2f
2 changed files with 12 additions and 3 deletions
11
lib/ioctl.c
11
lib/ioctl.c
|
@ -38,13 +38,22 @@
|
|||
|
||||
/* ioctl wrappers */
|
||||
|
||||
int _comedi_ioctl( int fd, int request, unsigned long arg )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ioctl( fd, request, arg );
|
||||
if( ret < 0 )
|
||||
libc_error();
|
||||
return ret;
|
||||
}
|
||||
|
||||
int _comedi_ioctl_debug(int fd, int request, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
fprintf(stderr,"ioctl(%d,0x%08x,0x%08lx) = ",fd,request,arg);
|
||||
ret = ioctl(fd,request,arg);
|
||||
ret = _comedi_ioctl(fd,request,arg);
|
||||
fprintf(stderr,"%d\n",ret);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -126,10 +126,10 @@ struct subdevice_struct{
|
|||
comedi_cmd *cmd_timed;
|
||||
};
|
||||
|
||||
|
||||
#define comedi_ioctl ioctl
|
||||
#define comedi_ioctl _comedi_ioctl
|
||||
//#define comedi_ioctl _comedi_ioctl_debug
|
||||
|
||||
int _comedi_ioctl( int fd, int request, unsigned long arg );
|
||||
int _comedi_ioctl_debug(int,int,unsigned long);
|
||||
|
||||
/* filler routines */
|
||||
|
|
Loading…
Add table
Reference in a new issue