From: Ian Abbott Date: Thu, 13 Jul 2006 17:06:33 +0000 (+0000) Subject: Use comedi_perror to report error if comedi_open fails, and exit with exit X-Git-Tag: v0_8_0~67 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d349d2e12b5ebc77f5048a4728fad51053610ac3;p=comedilib.git Use comedi_perror to report error if comedi_open fails, and exit with exit code 1. --- diff --git a/demo/info.c b/demo/info.c index 2885c6e..5964dcc 100644 --- a/demo/info.c +++ b/demo/info.c @@ -54,8 +54,8 @@ int main(int argc,char *argv[]) it=comedi_open(filename); if(!it){ - fprintf(stderr,"cannot open %s: %s\n",filename, strerror(errno)); - exit(0); + comedi_perror(filename); + exit(1); } printf("overall info:\n");