From: David Schleef Date: Wed, 11 Oct 2000 01:13:24 +0000 (+0000) Subject: removed comedi_config X-Git-Tag: r0_7_49~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f3ac84e74f95315ccb805f3277deb8714c0393fe;p=comedi.git removed comedi_config --- diff --git a/comedi_config/Makefile b/comedi_config/Makefile deleted file mode 100644 index 1fe9eee7..00000000 --- a/comedi_config/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - -CFLAGS=-Wall -O2 -I../include -#LDFLAGS=-L../lib/ -lcomedi -LDFLAGS= - -OBJS=comedi_config.o - -comedi_config: $(OBJS) - $(CC) -o comedi_config $(OBJS) $(LDFLAGS) - -clean: - rm -f comedi_config *.o diff --git a/comedi_config/comedi_config.c b/comedi_config/comedi_config.c deleted file mode 100644 index da4e90b8..00000000 --- a/comedi_config/comedi_config.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - comedi_config/comedi_config.c - configuration program for comedi kernel module - - COMEDI - Linux Control and Measurement Device Interface - Copyright (C) 1998 David A. Schleef - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#define CC_VERSION "0.6.13" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -int quiet=0,verbose=0,script=0; - -void do_script(void); - -void do_help(int i) -{ - fputs( -"comedi_config version " CC_VERSION "\n" -"usage: comedi_config [-[vVq]] ,,...\n" -"where are integers (or blank) whose interpretation depends on\n" -"the driver. In general, however, option1 refers to the I/O port address\n" -"and option2 refers to IRQ number to be used by the driver\n" - ,stderr); - exit(i); -} - -int main(int argc,char *argv[]) -{ - comedi_devconfig it; - int fd; - int c,i,num,k; - char *opts; - char *fn,*driver; - struct stat statbuf; - int ret; - int remove=0; - - while(1){ - c=getopt(argc,argv,"rvVq"); - if(c==-1)break; - switch(c){ - case 'v': - verbose=1; - break; - case 'V': - fputs("comedi_config version " CC_VERSION "\n",stderr); - exit(0); - break; - case 'q': - quiet=1; - break; - case 'a': - script=1; - break; - case 'r': - remove=1; - break; - default: - do_help(1); - } - } - - if(script){ - if( (argc-optind)>0 ){ - do_help(1); - }else{ - do_script(); - } - } - - if((argc-optind)!=2 && (argc-optind)!=3){ - do_help(1); - } - - fn=argv[optind]; - - driver=argv[optind+1]; - strncpy(it.board_name,driver,COMEDI_NAMELEN-1); - - for(i=0;i=COMEDI_NDEVCONFOPTS) - do_help(1); - continue; - } - if(sscanf(opts,"%i%n",&num,&k)>0){ - it.options[i]=num; - opts+=k; - continue; - } - do_help(1); - } - } - - ret=stat(fn,&statbuf); - if(ret<0){ - perror(fn); - exit(1); - } -#if 0 - /* this appears to be broken */ - if( !(S_ISCHR(statbuf.st_mode)) || - major(statbuf.st_dev)!=COMEDI_MAJOR){ - if(!quiet) - fprintf(stderr,"warning: %s might not be a comedi device\n",fn); - } -#endif - - fd=open(fn,O_RDWR); - if(fd<0){ - perror(fn); - exit(1); - } - - /* add: sanity check for device */ - - if(verbose){ - printf("configuring driver=%s ",it.board_name); - for(i=0;i