|
|
|
@ -217,27 +217,27 @@ int main(int argc, char **argv)
|
|
|
|
|
/* process long opts */
|
|
|
|
|
case 0:
|
|
|
|
|
if (strcmp(long_options[option_index].name, "interface") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &interface);
|
|
|
|
|
sscanf(optarg, "%11i", &interface);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(long_options[option_index].name, "dir") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &dir);
|
|
|
|
|
sscanf(optarg, "%11i", &dir);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(long_options[option_index].name, "reset_release") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &reset_release);
|
|
|
|
|
sscanf(optarg, "%11i", &reset_release);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(long_options[option_index].name, "reset_set") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &reset_set);
|
|
|
|
|
sscanf(optarg, "%11i", &reset_set);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(long_options[option_index].name, "vref2_normal") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &vref2_normal);
|
|
|
|
|
sscanf(optarg, "%11i", &vref2_normal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strcmp(long_options[option_index].name, "vref2_erase") == 0) {
|
|
|
|
|
sscanf(optarg, "%i", &vref2_erase);
|
|
|
|
|
sscanf(optarg, "%11i", &vref2_erase);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
@ -251,11 +251,11 @@ int main(int argc, char **argv)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'v':
|
|
|
|
|
sscanf(optarg, "%i", &vendid);
|
|
|
|
|
sscanf(optarg, "%11i", &vendid);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'p':
|
|
|
|
|
sscanf(optarg, "%i", &prodid);
|
|
|
|
|
sscanf(optarg, "%11i", &prodid);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
@ -476,7 +476,7 @@ int print_and_prompt(struct ftdi_device_list *devlist)
|
|
|
|
|
input[last] = '\0';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sscanf(s, "%i", &sel);
|
|
|
|
|
sscanf(s, "%11i", &sel);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return sel;
|
|
|
|
|