about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-05-29 11:57:39 -0400
committerRichard Henderson <rth@redhat.com>2014-05-30 14:09:34 -0400
commit74f31c18593111725478a991b395ae45661985a3 (patch)
tree0e0173b91ac7123f530b4118f0c66a245ff3aced /sysdeps/unix
parent30477995dc8a680283b4d6e02039bca09de83cf9 (diff)
downloadglibc-74f31c18593111725478a991b395ae45661985a3.tar.gz
glibc-74f31c18593111725478a991b395ae45661985a3.tar.xz
glibc-74f31c18593111725478a991b395ae45661985a3.zip
aarch64: Fix error return from __ioctl
Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1
where the error branch was moved from PSEUDO_RET.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/ioctl.S13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/ioctl.S b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
index 4443f5a4aa..8920a202a1 100644
--- a/sysdeps/unix/sysv/linux/aarch64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/aarch64/ioctl.S
@@ -20,11 +20,12 @@
 
 	.text
 ENTRY(__ioctl)
-	movz	x8, #__NR_ioctl
-        sxtw	x0, w0
-        svc	#0x0
-	cmn	x0, #0x1, lsl #12
-	PSEUDO_RET
-	PSEUDO_END (__ioctl)
+	mov	x8, #__NR_ioctl
+	sxtw	x0, w0
+	svc	#0x0
+	cmn	x0, #4095
+	b.cs	.Lsyscall_error
+	ret
+PSEUDO_END (__ioctl)
 
 weak_alias (__ioctl, ioctl)