Roman Iten 5ebcf36d69 tool/run: introduce '[have_]cmd_arg'-procs
Renaming 'get_cmd_switch' and 'get_cmd_arg' to 'have_cmd_arg' and
'cmd_arg' respectively blends in nicely with the now omnipresent pattern
with 'have_[spec|board|installed|include]'.

This commit deprecates 'get_cmd_switch' and 'get_cmd_arg', which will be
removed in a later commit.

Issue 
2025-02-24 16:39:20 +01:00

27 lines
509 B
Plaintext

##
# Reset the target machine via executing external command
#
# \param --power-on-command-cmd external command
# \param --power-on-command-param command parameter (allows to specify device)
#
proc power_on_command_cmd { } {
return [cmd_arg_first --power-on-command-cmd 1]
}
proc power_on_command_params { } {
return [cmd_arg --power-on-command-param 1]
}
proc run_power_on { } {
set command [power_on_command_cmd]
set params [power_on_command_params]
exec $command {*}$params
return true
}