From: Yehuda Sadeh Date: Mon, 15 May 2023 17:55:40 +0000 (-0400) Subject: EOVERFLOW -> ERANGE X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f919fa19468051cb65616279dcc26e28a0c76be3;p=fscrypt.git EOVERFLOW -> ERANGE Signed-off-by: Yehuda Sadeh --- diff --git a/keyring/fs_keyring.go b/keyring/fs_keyring.go index 700072c..bd89ace 100644 --- a/keyring/fs_keyring.go +++ b/keyring/fs_keyring.go @@ -203,7 +203,7 @@ func fsAddEncryptionKey(key *crypto.Key, descriptor string, } _, _, errno := unix.Syscall(unix.SYS_IOCTL, dir.Fd(), unix.FS_IOC_ADD_ENCRYPTION_KEY, uintptr(argKey.UnsafePtr())) - if errno == unix.EOVERFLOW { + if errno == unix.ERANGE { _, _, errno = unix.Syscall(unix.SYS_IOCTL, dir.Fd(), uintptr(C.fs_ioc_add_encryption_key64), uintptr(argKey.UnsafePtr())) restorePrivs(savedPrivs)