[core] fixed a few bugs
This commit is contained in:
parent
9bbb09ef0f
commit
c00c43cbd4
|
@ -18,11 +18,11 @@ namespace openfpga {
|
||||||
* - Add associated options
|
* - Add associated options
|
||||||
* - Add command dependency
|
* - Add command dependency
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
static ShellCommandId add_openfpga_exec_external_command(
|
static ShellCommandId add_openfpga_ext_exec_command(
|
||||||
openfpga::Shell<OpenfpgaContext>& shell,
|
openfpga::Shell<OpenfpgaContext>& shell,
|
||||||
const ShellCommandClassId& cmd_class_id,
|
const ShellCommandClassId& cmd_class_id,
|
||||||
const std::vector<ShellCommandId>& dependent_cmds) {
|
const std::vector<ShellCommandId>& dependent_cmds) {
|
||||||
Command shell_cmd("exec_external");
|
Command shell_cmd("ext_exec");
|
||||||
|
|
||||||
/* Add an option '--command_stream' */
|
/* Add an option '--command_stream' */
|
||||||
CommandOptionId opt_cmdstream = shell_cmd.add_option(
|
CommandOptionId opt_cmdstream = shell_cmd.add_option(
|
||||||
|
@ -112,8 +112,8 @@ void add_basic_commands(openfpga::Shell<OpenfpgaContext>& shell) {
|
||||||
std::vector<ShellCommandId>());
|
std::vector<ShellCommandId>());
|
||||||
|
|
||||||
/* Add 'exec_external command which can run system call */
|
/* Add 'exec_external command which can run system call */
|
||||||
add_openfpga_exec_external_command(shell, basic_cmd_class,
|
add_openfpga_ext_exec_command(shell, basic_cmd_class,
|
||||||
std::vector<ShellCommandId>());
|
std::vector<ShellCommandId>());
|
||||||
|
|
||||||
/* Note:
|
/* Note:
|
||||||
* help MUST be the last to add because the linking to execute function will
|
* help MUST be the last to add because the linking to execute function will
|
||||||
|
|
|
@ -4,18 +4,17 @@
|
||||||
* - version
|
* - version
|
||||||
* - help
|
* - help
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
#include "basic_command.h"
|
|
||||||
|
|
||||||
#include "command_exit_codes.h"
|
#include "command_exit_codes.h"
|
||||||
#include "openfpga_title.h"
|
#include "openfpga_title.h"
|
||||||
|
#include "openfpga_basic.h"
|
||||||
|
|
||||||
/* begin namespace openfpga */
|
/* begin namespace openfpga */
|
||||||
namespace openfpga {
|
namespace openfpga {
|
||||||
|
|
||||||
static int source_existing_command(openfpga::Shell<OpenfpgaContext>* shell,
|
int source_existing_command(openfpga::Shell<OpenfpgaContext>* shell,
|
||||||
OpenfpgaContext& openfpga_ctx,
|
OpenfpgaContext& openfpga_ctx,
|
||||||
const Command& cmd,
|
const Command& cmd,
|
||||||
const CommandContext& cmd_context) {
|
const CommandContext& cmd_context) {
|
||||||
CommandOptionId opt_file = cmd.option("from_file");
|
CommandOptionId opt_file = cmd.option("from_file");
|
||||||
CommandOptionId opt_batch_mode = cmd.option("batch_mode");
|
CommandOptionId opt_batch_mode = cmd.option("batch_mode");
|
||||||
CommandOptionId opt_ss = cmd.option("command_stream");
|
CommandOptionId opt_ss = cmd.option("command_stream");
|
||||||
|
|
Loading…
Reference in New Issue