Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stat.Rdev (variable of type uint32) as uint64 #1574

Closed
1 of 5 tasks
zzdboy opened this issue Jan 1, 2024 · 4 comments · Fixed by #1575
Closed
1 of 5 tasks

stat.Rdev (variable of type uint32) as uint64 #1574

zzdboy opened this issue Jan 1, 2024 · 4 comments · Fixed by #1575

Comments

@zzdboy
Copy link

zzdboy commented Jan 1, 2024

Describe the bug
[A clear and concise description of what the bug is.]

To Reproduce

// paste example code reproducing the bug you are reporting

Expected behavior
[A clear and concise description of what you expected to happen.]

Environment (please complete the following information):

  • Windows: [paste the result of ver]
  • Linux: [paste contents of /etc/os-release and the result of uname -a]
  • Mac OS: [paste the result of sw_vers and uname -a
  • FreeBSD: [paste the result of freebsd-version -k -r -u and uname -a]
  • OpenBSD: [paste the result of uname -a]

Additional context
[Cross-compiling? Paste the command you are using to cross-compile and the result of the corresponding go env]

E:\Go\pkg\mod\github.com\shirou\gopsutil\v3@v3.23.12\disk\disk_linux.go:510:22: cannot use stat.Rdev (variable of type uint32) as uint64 value in argument to unix.Major
E:\Go\pkg\mod\github.com\shirou\gopsutil\v3@v3.23.12\disk\disk_linux.go:511:22: cannot use stat.Rdev (variable of type uint32) as uint64 value in argument to unix.Minor
E:\Go\pkg\mod\github.com\shirou\gopsutil\v3@v3.23.12\disk\disk_linux.go:544:22: cannot use stat.Rdev (variable of type uint32) as uint64 value in argument to unix.Major
E:\Go\pkg\mod\github.com\shirou\gopsutil\v3@v3.23.12\disk\disk_linux.go:545:22: cannot use stat.Rdev (variable of type uint32) as uint64 value in argument to unix.Minor

@shirou
Copy link
Owner

shirou commented Jan 1, 2024

Could you show us those? Thank you.

  1. reproducible code
  2. contents of /etc/os-release and the result of uname -a
  3. what if [linux][disk]: fix Rdev cast #1575 applied

@CoiaPrant233
Copy link

CoiaPrant233 commented Jan 4, 2024

https://cs.opensource.google/go/x/sys/+/refs/tags/v0.15.0:unix/ztypes_linux_mips.go#L92

Lines 92

Not all arch of linux is uint64, so must convert it

@CoiaPrant233
Copy link

Could you show us those? Thank you.

  1. reproducible code
  2. contents of /etc/os-release and the result of uname -a
  3. what if [linux][disk]: fix Rdev cast #1575 applied

Please fix this bug quickly

@phuonganh2601
Copy link

Same problem when build project for Mipsle.
Temporarily downgrade to version v3.23.10 and problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants