133320Sdonn/* 238105Sbostic * Copyright (c) 1983 The Regents of the University of California. 338105Sbostic * All rights reserved. 433320Sdonn * 5*42683Sbostic * %sccs.include.redist.c% 633320Sdonn * 7*42683Sbostic * @(#)cerror.sun.s 5.3 (Berkeley) 06/01/90 838105Sbostic */ 938105Sbostic 1038105Sbostic/* 1133320Sdonn * modified version of cerror 1233320Sdonn * 1333320Sdonn * The idea is that every time an error occurs in a system call 1433320Sdonn * I want a special function "syserr" called. This function will 1533320Sdonn * either print a message and exit or do nothing depending on 1633320Sdonn * defaults and use of "onsyserr". 1733320Sdonn */ 1833320Sdonn 1933320Sdonn.data 2033320Sdonn.globl _errno 2133320Sdonn_errno: 2233320Sdonn .long 0 2333320Sdonn.text 2433320Sdonn 2533320Sdonn.globl cerror 2633320Sdonncerror: 2733320Sdonn movl d0,_errno 2833320Sdonn jbsr _syserr /* new code */ 2933320Sdonn moveq #-1,d0 3033320Sdonn rts 3133320Sdonn 3233320Sdonn.globl __mycerror /* clumsy way to get this loaded */ 3333320Sdonn 3433320Sdonn__mycerror: 3533320Sdonn rts 36