From 7dce7e89499b4ab4a997d5c85b1539d3906ed11d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 8 Jun 2001 22:37:08 +0000 Subject: [PATCH] /proc/comedi dumps out the device names recognized for each driver --- comedi/proc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/comedi/proc.c b/comedi/proc.c index 2f029658..c0733449 100644 --- a/comedi/proc.c +++ b/comedi/proc.c @@ -54,6 +54,8 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi #endif +extern comedi_driver *comedi_drivers; + #ifdef LINUX_V20 int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int unused) #else @@ -63,6 +65,7 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi int i; int devices_q=0; int l=0; + comedi_driver *driv; l+=sprintf(buf+l, "comedi version " COMEDI_RELEASE "\n" @@ -87,6 +90,17 @@ int comedi_read_procmem(char *buf,char **start,off_t offset,int len,int *eof,voi l+=sprintf(buf+l,"no devices\n"); } + for(driv=comedi_drivers;driv;driv=driv->next){ + l += sprintf(buf+l,"%s:\n",driv->driver_name); + for(i=0;inum_names;i++){ + l+=sprintf(buf+l," %s\n", + *(char **)(driv->board_name+i*driv->offset)); + } + if(!driv->num_names){ + l+=sprintf(buf+l," %s\n",driv->driver_name); + } + } + return l; } -- 2.26.2