mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 23:11:57 +00:00
resourcecontrol: convert stats dev_t to unit64types
Their types may differ on various host OSes, but unix.Major|Minor always takes a uint64 Depends-on: github.com/kata-containers/tests#4516 Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
parent
5be188cc29
commit
cc58cf6993
@ -35,8 +35,8 @@ func DeviceToCgroupDeviceRule(device string) (*devices.Rule, error) {
|
|||||||
return nil, fmt.Errorf("unsupported device type: %v", devType)
|
return nil, fmt.Errorf("unsupported device type: %v", devType)
|
||||||
}
|
}
|
||||||
|
|
||||||
major := int64(unix.Major(st.Rdev))
|
major := int64(unix.Major(uint64(st.Rdev)))
|
||||||
minor := int64(unix.Minor(st.Rdev))
|
minor := int64(unix.Minor(uint64(st.Rdev)))
|
||||||
deviceRule.Major = major
|
deviceRule.Major = major
|
||||||
deviceRule.Minor = minor
|
deviceRule.Minor = minor
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user