1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

disk[linux]: cast uint64 for build on MIPS

related: #533
This commit is contained in:
shirou 2018-06-12 22:59:43 +09:00
parent bc5d02c9ac
commit d813235a11

View File

@ -391,8 +391,8 @@ func GetDiskSerialNumberWithContext(ctx context.Context, name string) string {
if err != nil {
return ""
}
major := unix.Major(stat.Rdev)
minor := unix.Minor(stat.Rdev)
major := unix.Major(uint64(stat.Rdev))
minor := unix.Minor(uint64(stat.Rdev))
// Try to get the serial from udev data
udevDataPath := fmt.Sprintf("/run/udev/data/b%d:%d", major, minor)