Skip to content

Commit

Permalink
build: introduction of archConvertStatFs function
Browse files Browse the repository at this point in the history
Fixes: kata-containers#908

Not all the architectures convert the StatFs to int64 (e.g s390x). The
function archConvertStatFs could be reimplemented for other architecture
to correctly convert the StatFs.Type.

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
  • Loading branch information
Alice Frosi committed Nov 15, 2018
1 parent 0911331 commit 4594c85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cli/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func isCgroupMounted(cgroupPath string) bool {
return false
}

if statFs.Type != int64(cgroupFsType) {
if statFs.Type != archConvertStatFs(cgroupFsType) {
return false
}

Expand Down
7 changes: 7 additions & 0 deletions cli/utils_arch_base.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// +build !s390x

package main

func archConvertStatFs(cgroupFsType int) int64 {
return int64(cgroupFsType)
}

0 comments on commit 4594c85

Please sign in to comment.