Skip to content

Commit

Permalink
Bump x/sys/unix
Browse files Browse the repository at this point in the history
A newer version of x/sys/unix updates the OpenBSD bindings
which makes the `int8SliceToString` helper function obsolete.

This change updates the x/sys/unix version
  • Loading branch information
akhramov committed Jun 5, 2022
1 parent ad57f78 commit c875a63
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 37 deletions.
2 changes: 1 addition & 1 deletion mountinfo/go.mod
Expand Up @@ -2,4 +2,4 @@ module github.com/moby/sys/mountinfo

go 1.16

require golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
require golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
2 changes: 2 additions & 0 deletions mountinfo/go.sum
@@ -1,2 +1,4 @@
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
8 changes: 8 additions & 0 deletions mountinfo/mountinfo_bsd.go
Expand Up @@ -54,3 +54,11 @@ func mounted(path string) (bool, error) {
// Fallback to parsing mountinfo
return mountedByMountinfo(path)
}

func getMountinfo(entry *unix.Statfs_t) *Info {
var mountinfo Info
mountinfo.Mountpoint = unix.ByteSliceToString(entry.Mntonname[:])
mountinfo.FSType = unix.ByteSliceToString(entry.Fstypename[:])
mountinfo.Source = unix.ByteSliceToString(entry.Mntfromname[:])
return &mountinfo
}
14 changes: 0 additions & 14 deletions mountinfo/mountinfo_freebsdlike.go

This file was deleted.

22 changes: 0 additions & 22 deletions mountinfo/mountinfo_openbsd.go

This file was deleted.

0 comments on commit c875a63

Please sign in to comment.