demo/dio: exit with failure if comedi_dio_config() fails.
This commit is contained in:
parent
a19f4d463f
commit
c413483a66
1 changed files with 4 additions and 0 deletions
|
@ -58,6 +58,10 @@ int main(int argc, char *argv[])
|
||||||
printf("for input.\n");
|
printf("for input.\n");
|
||||||
ret = comedi_dio_config(device, options.subdevice, options.channel, COMEDI_INPUT);
|
ret = comedi_dio_config(device, options.subdevice, options.channel, COMEDI_INPUT);
|
||||||
}
|
}
|
||||||
|
if(ret < 0){
|
||||||
|
comedi_perror("comedi_dio_config");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue