fix(ota): verifyFile missing arguments

This commit is contained in:
Siyuan Miao 2025-04-11 08:05:35 +02:00 committed by Siyuan
parent 1b34e3f35d
commit f61b16421c
1 changed files with 6 additions and 1 deletions

7
ota.go
View File

@ -391,7 +391,12 @@ func TryUpdate(ctx context.Context, deviceId string, includePreRelease bool) err
otaState.SystemDownloadProgress = 1
triggerOTAStateUpdate()
err = verifyFile("/userdata/jetkvm/update_system.tar", remote.SystemHash, &otaState.SystemVerificationProgress)
err = verifyFile(
"/userdata/jetkvm/update_system.tar",
remote.SystemHash,
&otaState.SystemVerificationProgress,
&scopedLogger,
)
if err != nil {
otaState.Error = fmt.Sprintf("Error verifying system update hash: %v", err)
scopedLogger.Error().Err(err).Msg("Error verifying system update hash")