mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 11:06:21 +00:00
build: introduction of archConvertStatFs function
Type of StatFs is not always declared as int64 for all the architecture(e.g s390x). The function archConvertStatFs could be reimplemented for other architecture to correctly convert the StatFs.Type. Fixes: #908 Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
This commit is contained in:
parent
0911331974
commit
b185f31c9e
@ -123,7 +123,7 @@ func isCgroupMounted(cgroupPath string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if statFs.Type != int64(cgroupFsType) {
|
if statFs.Type != archConvertStatFs(cgroupFsType) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
cli/utils_arch_base.go
Normal file
10
cli/utils_arch_base.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// +build !s390x
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
func archConvertStatFs(cgroupFsType int) int64 {
|
||||||
|
return int64(cgroupFsType)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user