From: Frank Mori Hess Date: Tue, 2 May 2006 02:04:56 +0000 (+0000) Subject: Patch from caleb@aei-tech.com (Caleb Tennis), which implements checks X-Git-Tag: r0_7_71~36 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=580aa98e8756aa3d1473c8b08b6532698a0e3c62;p=comedi.git Patch from caleb@aei-tech.com (Caleb Tennis), which implements checks for length of INSN_CONFIG_SERIAL_CLOCK and INSN_CONFIG_BIDIRECTIONAL_DATA. --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 922d9879..0d392995 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -632,10 +632,11 @@ static int check_insn_config_length(comedi_insn *insn, lsampl_t *data) if(insn->n == 1) return 0; break; case INSN_CONFIG_DIO_QUERY: - if(insn->n == 2) return 0; - break; case INSN_CONFIG_BLOCK_SIZE: + case INSN_CONFIG_SERIAL_CLOCK: + case INSN_CONFIG_BIDIRECTIONAL_DATA: if( insn->n == 2 ) return 0; + break; //by default we allow the insn since we don't have checks for all possible cases yet default: rt_printk("No check for data length of config insn id %i implemented. Assuming n=%i is correct.\n",