Skip to content

Commit

Permalink
lxd-imagebuilder/vm: fix int conversions
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Nov 29, 2024
1 parent 6cd2b6a commit 077c129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxd-imagebuilder/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ func (v *vm) lsblkLoopDevice() (parseMajorMinor func(int) (uint32, uint32, error

fields := strings.Split(deviceNumbers[i], ":")

majorNum, err := strconv.Atoi(fields[0])
majorNum, err := strconv.ParseUint(fields[0], 10, 32)
if err != nil {
return 0, 0, fmt.Errorf("Failed to parse %q: %w", fields[0], err)
}

minorNum, err := strconv.Atoi(fields[1])
minorNum, err := strconv.ParseUint(fields[1], 10, 32)
if err != nil {
return 0, 0, fmt.Errorf("Failed to parse %q: %w", fields[1], err)
}
Expand Down

0 comments on commit 077c129

Please sign in to comment.