Commit | Line | Data |
---|---|---|
adbf81b2 | 1 | /* |
8a90f3aa KB |
2 | * Copyright (c) 1983 The Regents of the University of California. |
3 | * All rights reserved. | |
adbf81b2 | 4 | * |
6ecf3d85 | 5 | * %sccs.include.redist.c% |
adbf81b2 | 6 | * |
6ecf3d85 | 7 | * @(#)cerror.vax.s 5.4 (Berkeley) %G% |
8a90f3aa KB |
8 | */ |
9 | ||
10 | /* | |
adbf81b2 DS |
11 | * modified version of cerror |
12 | * | |
13 | * The idea is that every time an error occurs in a system call | |
14 | * I want a special function "syserr" called. This function will | |
15 | * either print a message and exit or do nothing depending on | |
16 | * defaults and use of "onsyserr". | |
17 | */ | |
575705a6 SL |
18 | |
19 | .globl cerror | |
20 | .comm _errno,4 | |
21 | ||
22 | cerror: | |
23 | movl r0,_errno | |
adbf81b2 | 24 | calls $0,_syserr /* new code */ |
575705a6 SL |
25 | mnegl $1,r0 |
26 | ret | |
27 | ||
adbf81b2 | 28 | .globl __mycerror /* clumsy way to get this loaded */ |
575705a6 SL |
29 | |
30 | __mycerror: | |
31 | .word 0 | |
32 | ret |