From 650a3d7adbffc8bf6d307d9a00b5a755392465fe Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Wed, 8 Jan 2025 13:45:48 +0000 Subject: [PATCH] lxd/storage/drivers/driver/lvm/utils: Avoid use of inefficient Sprintf Signed-off-by: Thomas Parrott --- lxd/storage/drivers/driver_lvm_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/storage/drivers/driver_lvm_utils.go b/lxd/storage/drivers/driver_lvm_utils.go index a2ee9c8ecc8e..d7e1bbb30b25 100644 --- a/lxd/storage/drivers/driver_lvm_utils.go +++ b/lxd/storage/drivers/driver_lvm_utils.go @@ -513,7 +513,7 @@ func (d *lvm) resizeLogicalVolume(lvPath string, sizeBytes int64) error { return fmt.Errorf("Error checking LVM version: %w", err) } - args := []string{"-L", fmt.Sprintf("%db", sizeBytes), "-f", lvPath} + args := []string{"-L", strconv.FormatInt(sizeBytes, 10) + "b", "-f", lvPath} if isRecent { args = append(args, "--fs=ignore") }