Skip to content

Commit 134dcd7

Browse files
committed
fixup! internal/mount: (pre-)merge mounting code
1 parent d9ce879 commit 134dcd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/mount/mount.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"strings"
1515
)
1616

17-
// SetupMount formats the csi device to ext4 and mounts it to the provided mount point.
17+
// SetupMount formats the csi device to ext4 in case it is not ext4 formatted and mounts it to the provided mount point.
1818
func SetupMount(ctx context.Context, logger *slog.Logger, devPath, mountPoint string) error {
1919
blk, err := Blkid(ctx, devPath)
2020
if errors.Is(err, errNotIdentified) {
@@ -84,11 +84,11 @@ func parseBlkidCommand(out []byte) (*Blk, error) {
8484
case "TYPE":
8585
b.Type = value
8686
case "BLOCK_SIZE":
87-
intValue, err := strconv.Atoi(value)
87+
blockSize, err := strconv.Atoi(value)
8888
if err != nil {
8989
return nil, fmt.Errorf("parsing BLOCK_SIZE of blkid output %q: %w", value, err)
9090
}
91-
b.BlockSize = intValue
91+
b.BlockSize = blockSize
9292
}
9393
}
9494
return b, nil

0 commit comments

Comments
 (0)