summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-04-05 21:25:11 +0000
committerRoland McGrath <roland@gnu.org>1995-04-05 21:25:11 +0000
commitf9720d8b686749a1ed99c5e1944d37186093ac6d (patch)
treef138e546e9a40ebbea8c7de620887a05adc8019c
parent036f13b91f049f564a3a9803c4b01134df39ce29 (diff)
Check for errors.
-rw-r--r--boot/syscall.S14
1 files changed, 8 insertions, 6 deletions
diff --git a/boot/syscall.S b/boot/syscall.S
index ab392c9e..1f6b7307 100644
--- a/boot/syscall.S
+++ b/boot/syscall.S
@@ -1,5 +1,5 @@
/* Temporary....
- Copyright (C) 1993 Free Software Foundation
+ Copyright (C) 1993, 1995 Free Software Foundation
This file is part of the GNU Hurd.
@@ -17,10 +17,7 @@ You should have received a copy of the GNU General Public License
along with the GNU Hurd; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* Written by Michael I. Bushnell. */
-
-/* This does not handle errors */
-
+ .globl _errno
.text
.globl _syscall
.align 4
@@ -28,5 +25,10 @@ _syscall:
pop %ecx
pop %eax
push %ecx
- .byte 0x9a, 0, 0, 0, 0, 7, 0
+ lcall $7, $0
+ jb error
+ ret
+error:
+ movl %eax,_errno
+ movl $-1,%eax
ret