From d349d2e12b5ebc77f5048a4728fad51053610ac3 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 13 Jul 2006 17:06:33 +0000 Subject: [PATCH] Use comedi_perror to report error if comedi_open fails, and exit with exit code 1. --- demo/info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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");