aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc/sparc32
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-08-16 19:44:26 +0000
committerJakub Jelinek <jakub@redhat.com>2007-08-16 19:44:26 +0000
commit91ddd9c44807742aba0fd255b0345bbb547e1d50 (patch)
treee53b85646dca01c2ab344e021e72d7cdba106701 /sysdeps/unix/sysv/linux/sparc/sparc32
parent18915760ad84c8901767391f0633b189d7bf2cd3 (diff)
downloadglibc-91ddd9c44807742aba0fd255b0345bbb547e1d50.tar
glibc-91ddd9c44807742aba0fd255b0345bbb547e1d50.tar.gz
glibc-91ddd9c44807742aba0fd255b0345bbb547e1d50.tar.bz2
glibc-91ddd9c44807742aba0fd255b0345bbb547e1d50.zip
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone):
If the syscall fails, set errno to the actual returned error number rather than EINVAL. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): If arguments are incorrect, set errno to EINVAL, if the syscall fails, set errno to the actual returned error number. * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): If the syscall fails, set errno to the actual returned error number rather than EINVAL. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (__clone): If arguments are incorrect, set errno to EINVAL, if the syscall fails, set errno to the actual returned error number.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/clone.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
index 1e099cc97d..a64d8e519b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
@@ -41,9 +41,9 @@ ENTRY (__clone)
/* sanity check arguments */
orcc %i0,%g0,%g2
- be .Lerror
+ be .Leinval
orcc %i1,%g0,%o1
- be .Lerror
+ be .Leinval
mov %i2,%o0
/* The child_stack is the top of the stack, allocate one
@@ -70,9 +70,11 @@ ENTRY (__clone)
jmpl %i7 + 8, %g0
restore %o0,%g0,%o0
+.Leinval:
+ mov EINVAL, %o0
.Lerror:
call HIDDEN_JUMPTARGET(__errno_location)
- or %g0,EINVAL,%i0
+ mov %o0, %i0
st %i0,[%o0]
jmpl %i7 + 8, %g0
restore %g0,-1,%o0