Skip to content

Commit

Permalink
lxd/storage/drivers/driver/lvm/utils: Avoid use of inefficient Sprintf
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline committed Jan 8, 2025
1 parent 03ec4fa commit 650a3d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lxd/storage/drivers/driver_lvm_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 650a3d7

Please sign in to comment.