mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-29 17:39:36 +02:00
main: raise error when board name is provided but not found
This commit is contained in:
+7
-2
@@ -97,8 +97,13 @@ int main(int argc, char **argv)
|
||||
if (args.prg_type == Device::WR_FLASH)
|
||||
cout << "write to flash" << endl;
|
||||
|
||||
if (args.board[0] != '-' && board_list.find(args.board) != board_list.end()) {
|
||||
board = &(board_list[args.board]);
|
||||
if (args.board[0] != '-') {
|
||||
if (board_list.find(args.board) != board_list.end()) {
|
||||
board = &(board_list[args.board]);
|
||||
} else {
|
||||
printError("Error: cannot find board \'" +args.board + "\'");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
/* if a board name is specified try to use this to determine cable */
|
||||
|
||||
Reference in New Issue
Block a user