Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Added errno translation for non native OS...
details: https://anonhg.NetBSD.org/src/rev/75e928e9dd5a
branches: trunk
changeset: 521655:75e928e9dd5a
user: manu <manu%NetBSD.org@localhost>
date: Sat Feb 02 20:28:59 2002 +0000
description:
Added errno translation for non native OSes emulation (IRIX, Linux, Ultrix)
diffstat:
sys/arch/mips/mips/syscall.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r a8071d0441f1 -r 75e928e9dd5a sys/arch/mips/mips/syscall.c
--- a/sys/arch/mips/mips/syscall.c Sat Feb 02 20:20:23 2002 +0000
+++ b/sys/arch/mips/mips/syscall.c Sat Feb 02 20:28:59 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.6 2001/12/02 08:28:18 manu Exp $ */
+/* $NetBSD: syscall.c,v 1.7 2002/02/02 20:28:59 manu Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.6 2001/12/02 08:28:18 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.7 2002/02/02 20:28:59 manu Exp $");
#include "opt_ktrace.h"
#include "opt_syscall_debug.h"
@@ -237,6 +237,9 @@
/* XXX register_t vs. mips_reg_t */
error = (*callp->sy_call)(p, args, (register_t *)&frame->f_regs[V0]);
+ if (p->p_emul->e_errno)
+ error = p->p_emul->e_errno[error];
+
switch (error) {
case 0:
frame->f_regs[A3] = 0;
@@ -363,6 +366,9 @@
/* XXX register_t vs. mips_reg_t */
error = (*callp->sy_call)(p, args, (register_t *)&frame->f_regs[V0]);
+ if (p->p_emul->e_errno)
+ error = p->p_emul->e_errno[error];
+
switch (error) {
case 0:
frame->f_regs[A3] = 0;
Home |
Main Index |
Thread Index |
Old Index