From 6ee77f1fbb70475b441c84eb31c7a209758db77d Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 15 Dec 2017 16:55:32 -0500 Subject: [PATCH] Fix the code to handle multiple activate, found bug with UT cases --- xCAT-server/lib/xcat/plugins/openbmc.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 92bc14928..c2be6d68a 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -1180,7 +1180,10 @@ sub parse_args { } if (scalar @flash_arguments > 1) { - if ($filename_passed and $option_flag !~ /^-d$/) { + if (($option_flag =~ /^-a$|^--delete$/) or ($filename_passed and $option_flag !~ /^-d$/)) { + # Handles: + # - Multiple options not supported to activate/delete at the same time + # - Filename passed in and option is not -d for directory return ([1, "More than one firmware specified is not supported."]); } elsif ($option_flag =~ /^-d$/) { return ([1, "More than one directory specified is not supported."]);