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

Fix []int8 to []byte in disk/disk_openbsd.go due to x/sys/unix type change #1310

Merged
merged 2 commits into from Jun 7, 2022

Commits on Jun 6, 2022

  1. Mirror updated x/sys/unix OpenBSD Statfs_t fields

    Per change in x/sys/unix, these Statfs_t fields are now converted to
    []byte rather than []int8. Callers with updated x/sys/unix versions will
    now see something like:
    
    > Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:59:53: cannot use stat.F_mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString
    > Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:60:51: cannot use stat.F_mntonname[:] (type []byte) as type []int8 in argument to common.IntToString
    > Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:61:52: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
    > Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:149:45: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
    
    It is probably prudent to update to the newer struct definitions as a
    result.
    
    See also: https://groups.google.com/g/golang-codereviews/c/bPBR9-4hV6E
    See also: https://go-review.googlesource.com/c/sys/+/407195/2
    See also: golang/sys@bc2c85a
    
    Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
    cipherboy committed Jun 6, 2022
    Copy the full SHA
    aee8cec View commit details
    Browse the repository at this point in the history
  2. Update go.mod to clarify newer sys/unix dependency

    Updated via:
    
    $ go get -u golang.org/x/sys && go mod tidy
    
    We now require upstream commit bc2c85a on OpenBSD due to type changes.
    
    Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
    cipherboy committed Jun 6, 2022
    Copy the full SHA
    4ad218b View commit details
    Browse the repository at this point in the history