162139Sbostic# Copyright (c) 1982, 1993
262139Sbostic#	The Regents of the University of California.  All rights reserved.
330833Smckusick#
448098Sbostic# %sccs.include.redist.sh%
530833Smckusick#
6*62140Sbostic#	@(#)cerror.s	8.1 (Berkeley) 06/06/93
730833Smckusick#
848098Sbostic
930833Smckusick# modified version of cerror
1030833Smckusick#
1130833Smckusick# The idea is that every time an error occurs in a system call
1230833Smckusick# I want a special function "syserr" called.  This function will
1330833Smckusick# either print a message and exit or do nothing depending on
1430833Smckusick# defaults and use of "onsyserr".
1530833Smckusick#
1630833Smckusick
1730833Smckusick.globl	cerror
1830833Smckusick.comm	_errno,4
1930833Smckusick
2030833Smckusickcerror:
2130833Smckusick	movl	d0,_errno
2230833Smckusick	jsr	_syserr		| new code
2330833Smckusick	moveq	#-1,d0
2430833Smckusick	rts
2530833Smckusick
2630833Smckusick.globl	__mycerror		| clumsy way to get this loaded
2730833Smckusick
2830833Smckusick__mycerror:
2930833Smckusick	.word	0
3030833Smckusick	rts
31