mirror of
https://github.com/prometheus/prometheus.git
synced 2026-06-09 00:22:19 -04:00
Merge pull request #18204 from roidelapluie/roidelapluie/bugfssize
util/runtime: cast Blocks to uint64 to fix type mismatch on different architectures
This commit is contained in:
commit
e53dc342d0
1 changed files with 2 additions and 1 deletions
|
|
@ -89,5 +89,6 @@ func FsSize(path string) uint64 {
|
|||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return uint64(fs.Bsize) * fs.Blocks
|
||||
//nolint:unconvert // Blocks is int64 on some operating systems (e.g. dragonfly).
|
||||
return uint64(fs.Bsize) * uint64(fs.Blocks)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue