From: David Schleef Date: Tue, 12 Feb 2002 00:54:20 +0000 (+0000) Subject: Added printing of Id string from device source X-Git-Tag: r0_7_19~95 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2491b315c6227117e0b38f88d5b883249796a5ec;p=comedilib.git Added printing of Id string from device source --- diff --git a/comedi_calibrate/calib.h b/comedi_calibrate/calib.h index 410441e..2460786 100644 --- a/comedi_calibrate/calib.h +++ b/comedi_calibrate/calib.h @@ -83,6 +83,8 @@ void reset_caldacs(void); /* drivers */ +extern char ni_id[]; + void ni_setup(void); /* low level */ diff --git a/comedi_calibrate/comedi_calibrate.c b/comedi_calibrate/comedi_calibrate.c index 3079a01..1d7a693 100644 --- a/comedi_calibrate/comedi_calibrate.c +++ b/comedi_calibrate/comedi_calibrate.c @@ -62,13 +62,14 @@ int device_status = STATUS_UNKNOWN; struct board_struct{ char *name; + char *id; void (*setup)(void); }; struct board_struct drivers[] = { - { "ni_pcimio", ni_setup }, - { "ni_atmio", ni_setup }, - { "ni_mio_cs", ni_setup }, + { "ni_pcimio", ni_id, ni_setup }, + { "ni_atmio", ni_id, ni_setup }, + { "ni_mio_cs", ni_id, ni_setup }, }; #define n_drivers (sizeof(drivers)/sizeof(drivers[0])) @@ -187,9 +188,10 @@ ok: if(verbose>=0){ char *s = "$Id$"; - printf("%*s\n",strlen(s)-2,s+1); + printf("%.*s\n",strlen(s)-2,s+1); printf("Driver name: %s\n",drivername); printf("Device name: %s\n",devicename); + printf("%.*s\n",strlen(this_board->id)-2,this_board->id+1); printf("Comedi version: %d.%d.%d\n", (comedi_get_version_code(dev)>>16)&0xff, (comedi_get_version_code(dev)>>8)&0xff,