Skip to content

Commit

Permalink
fixup! internal/mount: (pre-)merge mounting code
Browse files Browse the repository at this point in the history
  • Loading branch information
jmxnzo committed Jan 21, 2025
1 parent d9ce879 commit 134dcd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
)

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

0 comments on commit 134dcd7

Please sign in to comment.