virtcontainers: Convert stats dev_t to uint64

We need to convert them to uint64 as their types may differ on various
host OSes, but unix.Major|Minor takes a uint64 regardless.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
This commit is contained in:
Samuel Ortiz
2021-11-25 10:17:08 +01:00
committed by Eric Ernst
parent 56751089c0
commit ad0449195d
5 changed files with 13 additions and 13 deletions

View File

@@ -144,8 +144,8 @@ func getDeviceForPath(path string) (device, error) {
if isHostDevice(path) {
// stat.Rdev describes the device that this file (inode) represents.
devMajor = major(stat.Rdev)
devMinor = minor(stat.Rdev)
devMajor = major(uint64(stat.Rdev))
devMinor = minor(uint64(stat.Rdev))
return device{
major: devMajor,
@@ -154,8 +154,8 @@ func getDeviceForPath(path string) (device, error) {
}, nil
}
// stat.Dev points to the underlying device containing the file
devMajor = major(stat.Dev)
devMinor = minor(stat.Dev)
devMajor = major(uint64(stat.Dev))
devMinor = minor(uint64(stat.Dev))
path, err = filepath.Abs(path)
if err != nil {