aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-06-02 18:02:08 -0700
committerGitHub <noreply@github.com>2020-06-02 18:02:08 -0700
commit9649ed0fd0ad4dcfc33454e0a86193fd255e62df (patch)
tree49b717b4fc9ffaa3c74d8388296802dbd853c4c1
parente9f3dea860bb314e95bf50a1c88688d4762ad302 (diff)
parent3b075f2fda880256b3d9de2e6197a224adc0a39f (diff)
Merge pull request #235 from ebiggers/32bit-fix
* cmd/fscrypt: fix 32-bit build * travis.yml: build 32-bit binary
-rw-r--r--.travis.yml7
-rw-r--r--cmd/fscrypt/errors.go4
2 files changed, 9 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 1a1686d..8cd01d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -46,6 +46,13 @@ jobs:
- <<: *build
go: 1.11.x
+ - name: Build and Unit Tests (32-bit)
+ before_install:
+ - sudo apt-get -y install gcc-multilib libpam0g-dev:i386
+ script:
+ - GO111MODULE=on go get github.com/google/fscrypt/cmd/fscrypt
+ - CGO_ENABLED=1 GOARCH=386 make
+
- name: Integration Tests
sudo: required
before_install: sudo apt-get -y install e2fsprogs
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go
index 8bdab6e..10d744a 100644
--- a/cmd/fscrypt/errors.go
+++ b/cmd/fscrypt/errors.go
@@ -117,8 +117,8 @@ func suggestEnablingEncryption(mnt *filesystem.Mount) string {
if err := unix.Statfs(mnt.Path, &statfs); err != nil {
return ""
}
- pagesize := int64(os.Getpagesize())
- if statfs.Bsize != pagesize && !util.IsKernelVersionAtLeast(5, 5) {
+ pagesize := os.Getpagesize()
+ if int64(statfs.Bsize) != int64(pagesize) && !util.IsKernelVersionAtLeast(5, 5) {
return fmt.Sprintf(`This filesystem uses a block size
(%d) other than the system page size (%d). Ext4
encryption didn't support this case until kernel v5.5.