From f56525fc92f17f5808f122d5450ce0f01791c42c Mon Sep 17 00:00:00 2001 From: XuWei Date: Thu, 14 Dec 2017 02:21:32 -0500 Subject: [PATCH] Fix issue 4513, print out better error msg for reventlog -s --- xCAT-server/lib/xcat/plugins/openbmc.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 7bfffabaa..96a9812f5 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -946,8 +946,14 @@ sub parse_args { return ([ 1, "Error parsing arguments." ]) if ($option !~ /V|verbose/); } - if (scalar(@ARGV) >= 2 and ($command =~ /rpower|rinv|rvitals|reventlog/)) { + if (scalar(@ARGV) >= 2 and ($command =~ /rpower|rinv|rvitals/)) { return ([ 1, "Only one option is supported at the same time for $command" ]); + } elsif (scalar(@ARGV) >= 2 and $command eq "reventlog") { + my $option_s; + GetOptions( 's' => \$option_s ); + return ([ 1, "The -s option is not supported for OpenBMC." ]) if ($option_s); + return ([ 1, "Only one option is supported at the same time for $command" ]); + } elsif (scalar(@ARGV) == 0 and $command =~ /rpower|rspconfig|rflash/) { return ([ 1, "No option specified for $command" ]); } else {