From bb3a3fee44c70e1ce16a3399be09e6f8b94e8597 Mon Sep 17 00:00:00 2001 From: Paul Mars Date: Wed, 16 Oct 2024 11:00:13 +0200 Subject: [PATCH] i/statemachine: Rename setStructureSize to raiseStructureSizes to clarify its role Signed-off-by: Paul Mars --- internal/statemachine/common_states.go | 2 +- internal/statemachine/helper.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/statemachine/common_states.go b/internal/statemachine/common_states.go index 369892b8..21175e9f 100644 --- a/internal/statemachine/common_states.go +++ b/internal/statemachine/common_states.go @@ -177,7 +177,7 @@ func (stateMachine *StateMachine) calculateRootfsSize() error { } if rootfsStructure != nil { - setStructureSize(rootfsStructure, stateMachine.RootfsSize) + raiseStructureSizes(rootfsStructure, stateMachine.RootfsSize) } return nil diff --git a/internal/statemachine/helper.go b/internal/statemachine/helper.go index 525eaccf..c66f74e9 100644 --- a/internal/statemachine/helper.go +++ b/internal/statemachine/helper.go @@ -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 }