Skip to content

Commit

Permalink
Merge pull request #1824 from cyphar/fix-mips-build-devNumber
Browse files Browse the repository at this point in the history
libcontainer: devices: fix mips builds
  • Loading branch information
crosbymichael authored Jun 25, 2018
2 parents eff9297 + a0e99e7 commit 2c632d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libcontainer/devices/devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ func DeviceFromPath(path, permissions string) (*configs.Device, error) {
}

var (
devNumber = stat.Rdev
devNumber = uint64(stat.Rdev)
major = unix.Major(devNumber)
minor = unix.Minor(devNumber)
)
if major == 0 {
return nil, ErrNotADevice
Expand All @@ -51,7 +52,7 @@ func DeviceFromPath(path, permissions string) (*configs.Device, error) {
Type: devType,
Path: path,
Major: int64(major),
Minor: int64(unix.Minor(devNumber)),
Minor: int64(minor),
Permissions: permissions,
FileMode: os.FileMode(mode),
Uid: stat.Uid,
Expand Down

0 comments on commit 2c632d1

Please sign in to comment.