Merge pull request #11005 from k8s-infra-cherrypick-robot/cherry-pick-10981-to-release/2.0

[release/2.0] fsverity_linux.go: Fix fsverity.IsEnabled() for big endian systems
This commit is contained in:
Fu Wei 2024-11-14 15:48:50 -08:00 committed by GitHub
commit da51d8ffd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 {