give an error message when user fails to provide firmware, and fix
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 20 Dec 2005 23:21:58 +0000 (23:21 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 20 Dec 2005 23:21:58 +0000 (23:21 +0000)
bug in test for whether firmware was provided.

comedi/drivers/me_daq.c

index 58daeb6f689cff2d43722f7f9c33b5fbee152609..685c3ff752ffa4f0d4a30e222cc74d73cbe6d30b 100644 (file)
@@ -820,8 +820,11 @@ found:
     aux_data = comedi_aux_data(it->options, 0);
     aux_len = it->options[COMEDI_DEVCONF_AUX_DATA_LENGTH];
 
-    if(!aux_data || aux_len)return -EINVAL;
-
+               if(!aux_data || aux_len < 1)
+               {
+                       comedi_error("You must provide me2600 firmware using the --init-data option of comedi_config");
+                       return -EINVAL;
+               }
     me2600_xilinx_download(dev, aux_data, aux_len);
   }