Convert statfs.Type for s390x (#98)

* Change apt URL for non-x86_64 platforms

* Convert statfs.Type for s390x
This commit is contained in:
Arthur Barr
2018-05-31 11:55:32 +01:00
committed by Rob Parker
parent 45e970e18a
commit 0b36edae58

View File

@@ -19,6 +19,7 @@ package main
import (
"fmt"
"golang.org/x/sys/unix"
)
@@ -41,7 +42,8 @@ func checkFS(path string) error {
log.Println(err)
return nil
}
t := fsTypes[statfs.Type]
// Use a type conversion to make type an int64. On s390x it's a uint32.
t := fsTypes[int64(statfs.Type)]
switch t {
case "aufs", "overlayfs", "tmpfs":
return fmt.Errorf("%v uses unsupported filesystem type: %v", path, t)