+
+ string_list_element_t* k = opt->autosampledevs_.keys_.first_;
+ string_list_element_t* v = opt->autosampledevs_.values_.first_;
+ while(k && v) {
+ if(!key_value_storage_find(&opt->sampledevs_, k->string_)) {
+ log_printf(ERROR, "sample dev '%s' not in file '%s'", k->string_, opt->sampledev_file_);
+ return -1;
+ }
+ if(atoi(v->string_) <= 0) {
+ log_printf(ERROR, "invalid rate '%s' for sample dev '%s'", v->string_, k->string_);
+ return -1;
+ }
+ k = k->next_;
+ v = v->next_;
+ }
+
+ return 0;