[pve-devel] applied: [PATCH common] CLIHandler: use resolved command definition

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Jan 22 11:54:32 CET 2018


applied

On Mon, Jan 22, 2018 at 11:00:07AM +0100, Thomas Lamprecht wrote:
> For sub commands we resolve the real $cmd, $def and its arguments,
> thus we should also get the handler from the resolved $def, not the
> global one.
> 
> No change for normal (consisting of only the first argument)
> commands, for them $cmddef == $def.
> This sneaked in in a respin/rebase of the series.
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
> 
>  src/PVE/CLIHandler.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
> index caa7ca6..45c0427 100644
> --- a/src/PVE/CLIHandler.pm
> +++ b/src/PVE/CLIHandler.pm
> @@ -485,7 +485,7 @@ my $handle_cmd  = sub {
>  
>      &$preparefunc() if $preparefunc;
>  
> -    my ($class, $name, $arg_param, $uri_param, $outsub) = @{$cmddef->{$cmd} || []};
> +    my ($class, $name, $arg_param, $uri_param, $outsub) = @{$def || []};
>      $abort->("unknown command '$cmd_str'") if !$class;
>  
>      my $prefix = "$exename $cmd_str";
> -- 
> 2.14.2




More information about the pve-devel mailing list