[diskio] Force type of stat.Rdev uint64 for mipsle compatibility

For most platforms, stat.Rdev is already a uint64 so this is without any effect
for linux,mipsle, unix.Stat_t.Rdev is a uint32, but the way to compute major and minor doesn't change, casting the uint32 has no impact either
This commit is contained in:
Soulou 2019-03-21 12:00:20 +01:00
parent 2118fbe78a
commit 205de66dd6
No known key found for this signature in database
GPG Key ID: 9FC511C0EC98B9DA
1 changed files with 2 additions and 2 deletions

View File

@ -35,8 +35,8 @@ func (s *DiskIO) diskInfo(devName string) (map[string]string, error) {
return ic.values, nil return ic.values, nil
} }
major := unix.Major(stat.Rdev) major := unix.Major(uint64(stat.Rdev))
minor := unix.Minor(stat.Rdev) minor := unix.Minor(uint64(stat.Rdev))
udevDataPath := fmt.Sprintf("%s/b%d:%d", udevPath, major, minor) udevDataPath := fmt.Sprintf("%s/b%d:%d", udevPath, major, minor)
di := map[string]string{} di := map[string]string{}