Skip to content

Commit

Permalink
cmd/fscrypt: fix 32-bit build
Browse files Browse the repository at this point in the history
statfs.Bsize actually has platform-dependent type, despite the Go
documentation listing it as int64.

Resolves #233
  • Loading branch information
ebiggers committed Jun 3, 2020
1 parent e9f3dea commit a9a704e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/fscrypt/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a9a704e

Please sign in to comment.