[BACK]Return to xfs_error.c CVS log [TXT][DIR] Up to [Development] / xfs-linux-nodel

File: [Development] / xfs-linux-nodel / xfs_error.c (download)

Revision 1.5, Sun Jun 12 21:51:28 1994 UTC (23 years, 4 months ago) by doucette
Branch: MAIN
Changes since 1.4: +4 -24 lines

Take EINVAL out of the trap error list, too many things are getting it.
Replace the cpu-stopping code with a call to the same routine that
ASSERT uses now.

#ident "$Revision: 1.4 $"

#include "sys/types.h"
#include "sys/pda.h"
#include "sys/errno.h"
#include "sys/debug.h"
#ifdef SIM
#include <stdlib.h>
#endif
#include "xfs_error.h"

#ifdef DEBUG
int	xfs_etrap[XFS_ERROR_NTRAP] = { EIO };

int
xfs_error_trap(int e)
{
	int i;
#ifndef SIM
	int cpu;
	int id;
#endif

	if (!e)
		return 0;
	for (i = 0; i < XFS_ERROR_NTRAP; i++) {
		if (xfs_etrap[i] == 0)
			break;
		if (e != xfs_etrap[i])
			continue;
#ifdef SIM
		abort();
#else
		debug_stop_all_cpus();
#endif
		break;
	}
	return e;
}
#endif