chiark / gitweb /
volume_id: provide libvolume_id.a file
[elogind.git] / klibc / klibc / arch / i386 / socketcall.S
index 6bac1e6913ef9db874dddd11cecdc29607dae2bb..b13d204c32468d4d0d32915504e38d6dda67e64c 100644 (file)
        .type __socketcall_common, @function
 
 __socketcall_common:
-       pushl %ebx
-       movzbl %al,%ebx         # The socketcall number is passed in in %al
-       leal 8(%esp),%ecx       # Argument pointer
-       movl $__NR_socketcall, %eax
-       int $0x80
-       cmpl $-125,%eax         # Error return?
-       popl %ebx
-       jb 1f
-       neg %eax
-       movl %eax,errno
-       xorl %eax,%eax
-       decl %eax               # Return = -1
+       pushl   %ebx
+
+       movzbl  %al,%ebx        # The socketcall number is passed in in %al
+       leal    8(%esp),%ecx    # Argument pointer
+       movl    $__NR_socketcall,%eax
+       int     $0x80
+       
+       cmpl    $-4096,%eax     # Error return?
+       
+       popl    %ebx
+       
+       jb      1f
+       
+       negl    %eax
+       movl    %eax,errno
+       orl     $-1,%eax        # Return -1
 1:
        ret