runtime: command: add an arg to begin_processing() to indicate pipeline position

This commit is contained in:
2026-06-13 13:40:20 +01:00
parent de5058e045
commit 4c04ca6de8
6 changed files with 65 additions and 20 deletions
+19 -3
View File
@@ -57,6 +57,11 @@ static const fx_value *command_get_arg(
return &cmd->cmd_args[index];
}
static size_t command_get_arg_count(struct bshell_command_p *cmd)
{
return cmd->cmd_nr_args;
}
static fx_status get_command_type(
const fx_value *cmd_v,
const fx_property *prop,
@@ -236,14 +241,25 @@ const fx_value *bshell_command_get_arg(bshell_command *cmd, size_t index)
index);
}
enum bshell_status bshell_command_begin_processing(bshell_command *command)
size_t bshell_command_get_arg_count(const bshell_command *cmd)
{
FX_CLASS_DISPATCH_VIRTUAL_0(
FX_CLASS_DISPATCH_STATIC_0(
BSHELL_TYPE_COMMAND,
command_get_arg_count,
cmd);
}
enum bshell_status bshell_command_begin_processing(
bshell_command *command,
enum bshell_command_position position)
{
FX_CLASS_DISPATCH_VIRTUAL(
bshell_command,
BSHELL_TYPE_COMMAND,
BSHELL_ERR_NOT_SUPPORTED,
c_begin_processing,
command);
command,
position);
}
enum bshell_status bshell_command_process_record(