Skip to content

Commit

Permalink
asrockrack: Return unknown when nil progress and version match
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Nov 24, 2023
1 parent 834c495 commit fd2f0a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions providers/asrockrack/firmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ func (a *ASRockRack) firmwareUpdateStatus(ctx context.Context, component string,

switch installStatus {
case versionStrMatch:
if progress == nil {
// TODO: we should pass the force parameter to firmwareUpdateStatus,
// so that we can know if we expect a version change or not
a.log.V(3).Info("Nil progress + no version change -> unknown")
return constants.FirmwareInstallUnknown, nil
}

return constants.FirmwareInstallComplete, nil
case versionStrEmpty:
return constants.FirmwareInstallUnknown, nil
Expand Down

0 comments on commit fd2f0a8

Please sign in to comment.