Skip to content

Commit

Permalink
i/statemachine: Rename setStructureSize to raiseStructureSizes to cla…
Browse files Browse the repository at this point in the history
…rify its role

Signed-off-by: Paul Mars <[email protected]>
  • Loading branch information
upils committed Oct 16, 2024
1 parent 26a9158 commit bb3a3fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/statemachine/common_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (stateMachine *StateMachine) calculateRootfsSize() error {
}

if rootfsStructure != nil {
setStructureSize(rootfsStructure, stateMachine.RootfsSize)
raiseStructureSizes(rootfsStructure, stateMachine.RootfsSize)
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions internal/statemachine/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ func maxOffset(offset1, offset2 quantity.Offset) quantity.Offset {
return offset2
}

// setStructureSize raise both Size and MinSize to at least the given size
// raiseStructureSizes raise both Size and MinSize to at least the given size
// It helps make sure whatever value is used in snapd, it is set to the size we need
func setStructureSize(s *gadget.VolumeStructure, size quantity.Size) {
func raiseStructureSizes(s *gadget.VolumeStructure, size quantity.Size) {
if s.MinSize < size {
s.MinSize = size
}
Expand Down

0 comments on commit bb3a3fe

Please sign in to comment.