src/main: simplify svf type search
This commit is contained in:
parent
abf6fe35c1
commit
a0a68282cd
|
|
@ -498,9 +498,7 @@ int main(int argc, char **argv)
|
||||||
jtag->device_select(index);
|
jtag->device_select(index);
|
||||||
|
|
||||||
/* detect svf file and program the device */
|
/* detect svf file and program the device */
|
||||||
if (!args.bit_file.empty() &&
|
if (!args.file_type.compare("svf") || args.bit_file.find(".svf") >= 0) {
|
||||||
((!args.file_type.empty() && args.file_type == "svf") ||
|
|
||||||
(args.bit_file.substr(args.bit_file.find_last_of(".") + 1) == "svf"))) {
|
|
||||||
SVF_jtag *svf = new SVF_jtag(jtag, args.verbose);
|
SVF_jtag *svf = new SVF_jtag(jtag, args.verbose);
|
||||||
try {
|
try {
|
||||||
svf->parse(args.bit_file);
|
svf->parse(args.bit_file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue