Added printing of Id string from device source
authorDavid Schleef <ds@schleef.org>
Tue, 12 Feb 2002 00:54:20 +0000 (00:54 +0000)
committerDavid Schleef <ds@schleef.org>
Tue, 12 Feb 2002 00:54:20 +0000 (00:54 +0000)
comedi_calibrate/calib.h
comedi_calibrate/comedi_calibrate.c

index 410441e1cbaf5a4225fd0c33602d046e7281b991..24607867bbb159e5f3c0c944f7db1f3d68cd5d2e 100644 (file)
@@ -83,6 +83,8 @@ void reset_caldacs(void);
 
 /* drivers */
 
+extern char ni_id[];
+
 void ni_setup(void);
 
 /* low level */
index 3079a01832aa3b1677c85c17973543d944416c22..1d7a693bf53a59c1923902dae03702f8916f48c0 100644 (file)
@@ -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,