Skip to content

Commit ab9af7f

Browse files
committed
used existing blocksize constant
Signed-off-by: fs185143 <[email protected]>
1 parent 0a679a8 commit ab9af7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blockdevice/stats.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"os"
2222
"strings"
2323

24+
"github.com/prometheus/procfs/btrfs"
2425
"github.com/prometheus/procfs/internal/fs"
2526
"github.com/prometheus/procfs/internal/util"
2627
)
@@ -210,7 +211,6 @@ const (
210211
sysBlockDM = "dm"
211212
sysUnderlyingDev = "slaves"
212213
sysBlockSize = "size"
213-
sectorSize = 512
214214
)
215215

216216
// FS represents the pseudo-filesystems proc and sys, which provides an
@@ -484,5 +484,5 @@ func (fs FS) SysBlockDeviceSize(device string) (uint64, error) {
484484
if err != nil {
485485
return 0, err
486486
}
487-
return sectorSize * size, nil
487+
return btrfs.SectorSize * size, nil
488488
}

0 commit comments

Comments
 (0)