From: Frank Mori Hess Date: Sat, 26 Apr 2003 02:02:54 +0000 (+0000) Subject: made error message on failure to open device more informative X-Git-Tag: r0_7_21~214 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9700eeb713d33ef390223933edc461e8cb7d194e;p=comedilib.git made error message on failure to open device more informative --- diff --git a/comedi_calibrate/comedi_calibrate.c b/comedi_calibrate/comedi_calibrate.c index 91c6700..2612b60 100644 --- a/comedi_calibrate/comedi_calibrate.c +++ b/comedi_calibrate/comedi_calibrate.c @@ -170,7 +170,8 @@ int main(int argc, char *argv[]) dev = comedi_open(fn); if (dev == NULL ) { - perror(fn); + fprintf( stderr, "comedi_open() failed, with device file name: %s\n", fn ); + comedi_perror("comedi_open"); exit(0); } @@ -763,7 +764,7 @@ double check_gain_chan_x( calibration_setup_t *setup, linear_fit_t *l,unsigned i l->y_data=malloc(n*sizeof(double)/step); if(l->y_data == NULL) { - perror("check_gain_chan_x"); + perror( __FUNCTION__ ); exit(1); } @@ -834,7 +835,7 @@ double check_gain_chan_fine( calibration_setup_t *setup, linear_fit_t *l,unsigne l->y_data=malloc(n*sizeof(double)/step); if(l->y_data == NULL) { - perror("comedi_calibrate"); + perror( __FUNCTION__ ); exit(1); } @@ -1042,7 +1043,7 @@ int new_sv_measure( comedi_t *dev, new_sv_t *sv) data=malloc(sizeof(lsampl_t)*n); if(data == NULL) { - perror("comedi_calibrate"); + perror( __FUNCTION__ ); exit(1); } @@ -1090,7 +1091,7 @@ int new_sv_measure_order( comedi_t *dev, new_sv_t *sv,int order) data=malloc(sizeof(lsampl_t)*n); if(data == NULL) { - perror("comedi_calibrate"); + perror( __FUNCTION__ ); exit(1); }