Skip to content

Commit

Permalink
yosemite4: fw-versions: Add error handling for bic
Browse files Browse the repository at this point in the history
Summary:
Description:
Add error handling for bic.

Motivation:
pldmtool doesn't return non-zero value when it fails. Add error handling so we can know if it fails to get version.

X-link: facebookexternal/openbmc.wiwynn#3165

Test Plan:
Build code - pass
Tested on yv4 - pass

# Description

Please include a summary of the change and which issue is fixed.

# Motivation

Please include an explanation of why you these changes are necessary

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Reviewed By: williamspatrick

Differential Revision: D62098069

fbshipit-source-id: a248169de980296aa535790d77c25dd6135aaf09
  • Loading branch information
PeterHo-wiwynn authored and facebook-github-bot committed Sep 6, 2024
1 parent e13fed7 commit 39c1f01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ version=$(
jq --raw-output '.ActiveComponentImageSetVersionString'
)

if [ -z "$version" ]; then
echo "Failed to get slot$slot sd bic version"
exit 1
fi

busctl set-property \
xyz.openbmc_project.Settings \
"/xyz/openbmc_project/software/host$slot/Sentinel_Dome_bic" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ version=$(
jq --raw-output '.ActiveComponentImageSetVersionString'
)

if [ -z "$version" ]; then
echo "Failed to get slot$slot wf bic version"
exit 1
fi

busctl set-property \
xyz.openbmc_project.Settings \
"/xyz/openbmc_project/software/host$slot/Wailua_Falls_bic" \
Expand Down

0 comments on commit 39c1f01

Please sign in to comment.