Merge pull request #535 from shirou/cast_stat_for_mips

disk[linux]: cast uint64 for build on MIPS
pull/538/head
shirou 7 years ago committed by GitHub
commit c23bcca55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

Loading…
Cancel
Save