[v3.5,1/2] aarch64: Fix error return from __ioctl
Commit Message
From: Richard Henderson <rth@redhat.com>
Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1
where the error branch was moved from PSEUDO_RET.
---
sysdeps/unix/sysv/linux/aarch64/ioctl.S | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
Comments
On 29 May 2014 18:04, Richard Henderson <rth@twiddle.net> wrote:
> From: Richard Henderson <rth@redhat.com>
>
> Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1
> where the error branch was moved from PSEUDO_RET.
Looks OK.
/Marcus
@@ -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)