From 601df797293e993ee06e191144c269d45e53ea11 Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 31 Jan 2018 00:42:56 -0500 Subject: [PATCH] modify error msg for rflash unsupported option --- xCAT-server/lib/xcat/plugins/openbmc2.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 766791242..3f8855527 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -163,6 +163,11 @@ sub parse_args { if ($option_num >= 2) { return ([ 1, "Multiple options are not supported."]); } elsif ($option_num == 0) { + for my $arg (@ARGV) { + if ($arg =~ /^-/) { + return ([ 1, "Unsupported command: $command $arg" ]); + } + } return ([ 1, "No options specified."]); } if ($activate or $check or $delete or $upload) {