diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index c7106a535..8d8a8685b 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -2310,7 +2310,6 @@ sub rflash_response { my $update_activation = "Unknown"; my $update_purpose; my $update_version; - my $update_priority = -1; if ($node_info{$node}{cur_status} eq "RFLASH_LIST_RESPONSE") { # Get the functional IDs to accurately mark the active running FW @@ -2335,15 +2334,29 @@ sub rflash_response { # Entry has no Version attribute, skip listing it next; } + if ($xcatdebugmode) { + # Only print if xcatdebugmode is set and XCATBYPASS + print "\n\n================================= XCATBYPASS DEBUG START =================================\n"; + print "==> KEY_URL=$key_url\n"; + print "==> VERSION=$content{Version}\n"; + print "==> Dump out JSON data:\n"; + print Dumper(%content); + print "================================= XCATBYPASS DEBUG END =================================\n"; + } if (defined($content{Activation}) and $content{Activation}) { $update_activation = (split(/\./, $content{Activation}))[ -1 ]; } if (defined($content{Purpose}) and $content{Purpose}) { $update_purpose = (split(/\./, $content{Purpose}))[ -1 ]; } + + my $update_priority = -1; + # Just check defined, because priority=0 is a valid value if (defined($content{Priority})) { $update_priority = (split(/\./, $content{Priority}))[ -1 ]; } + + # Add indicators to the active firmware if (exists($functional->{$update_id}) ) { # # If the firmware ID exists in the hash, this indicates the really active running FW @@ -2357,7 +2370,6 @@ sub rflash_response { $indicator = "(*)"; } $update_activation = $update_activation . $indicator; - $update_priority = -1; # Reset update priority for next loop iteration } xCAT::SvrUtils::sendmsg(sprintf("%-8s %-7s %-10s %s", $update_id, $update_purpose, $update_activation, $update_version), $callback, $node); }