2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

fix rinv should return correct warning message when the option is not valid

This commit is contained in:
penguhyang
2016-10-20 01:10:07 -04:00
parent d5c31a0e1f
commit 5d13aa4cf4

View File

@ -2460,6 +2460,7 @@ sub beacon_answer {
sub inv {
my $sessdata = shift;
my $command = $sessdata->{command};
my $subcommand = $sessdata->{subcommand};
my $rc = 0;
@ -2515,9 +2516,9 @@ sub inv {
@types = qw(guid);
}
else {
@types = ($subcommand);
#return(1,"unsupported BMC inv argument $subcommand");
my $usage_string = xCAT::Usage->getUsage($command);
$callback->({ error => ["$usage_string"], errorcode => [1] });
return 1;
}
$sessdata->{invtypes} = \@types;
initfru($sessdata);