fsverity_linux.go: Fix fsverity.IsEnabled() for big endian systems

Signed-off-by: Alexey Lunev <cheembox573@gmail.com>
This commit is contained in:
Alexey Lunev 2024-11-10 23:11:19 +03:00 committed by k8s-infra-cherrypick-robot
parent abd8c4c39f
commit a7f2b562f3

View File

@ -80,7 +80,7 @@ func IsEnabled(path string) (bool, error) {
}
defer f.Close()
var attr int
var attr int32
_, _, flagErr := unix.Syscall(syscall.SYS_IOCTL, f.Fd(), uintptr(unix.FS_IOC_GETFLAGS), uintptr(unsafe.Pointer(&attr)))
if flagErr != 0 {