Skip to content

Commit

Permalink
Always set status.FmlCustomResolution
Browse files Browse the repository at this point in the history
Always set status.FmlCustomResolution to Unset in case there is no
cloud-config at all, we don't throw an error later in kvm.

Signed-off-by: Shahriyar Jalayeri <shahriyar@zededa.com>
  • Loading branch information
shjala committed Sep 20, 2024
1 parent ec1945c commit d0478ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions pkg/pillar/cmd/domainmgr/domainmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,6 @@ func configToStatus(ctx *domainContext, config types.DomainConfig,
err)
}

// Set FML custom resolution if it is set in cloud-init config
if isCloudConfig(ciStr) {
setFmlCustomResolution(ciStr, status)
}
Expand Down Expand Up @@ -2061,7 +2060,6 @@ func setFmlCustomResolution(config string, status *types.DomainStatus) {
return
}

status.FmlCustomResolution = types.FmlResolutionUnset
if val, ok := cloudinit[string(types.FmlCustomResolution)]; ok {
if fmlCustomResolution, valid := val.(string); valid {
status.FmlCustomResolution = fmlCustomResolution
Expand Down
2 changes: 1 addition & 1 deletion pkg/pillar/types/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ const (

var (
// FmlResolutionUnset is a string to indicate that custom resolution is not set
FmlResolutionUnset = "unset"
FmlResolutionUnset = ""
// FmlResolution800x600 is a string to indicate 800x600 resolution
FmlResolution800x600 = "800x600"
// FmlResolution1024x768 is a string to indicate 1024x768 resolution
Expand Down

0 comments on commit d0478ce

Please sign in to comment.