Patch from caleb@aei-tech.com (Caleb Tennis), which implements checks
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 2 May 2006 02:04:56 +0000 (02:04 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 2 May 2006 02:04:56 +0000 (02:04 +0000)
for length of INSN_CONFIG_SERIAL_CLOCK and INSN_CONFIG_BIDIRECTIONAL_DATA.

comedi/comedi_fops.c

index 922d98792b12689dbd1d1f52aa04009fbcf0e1c6..0d392995c75391cca10600a6924f1051a5de8be6 100644 (file)
@@ -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",