patch-2.1.9 linux/arch/sparc/kernel/sys_solaris.c

Next file: linux/arch/sparc/kernel/sys_sparc.c
Previous file: linux/arch/sparc/kernel/sunos_ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.8/linux/arch/sparc/kernel/sys_solaris.c linux/arch/sparc/kernel/sys_solaris.c
@@ -0,0 +1,29 @@
+/*
+ * linux/arch/sparc/sys_solaris.c
+ *
+ * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
+ */
+
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/personality.h>
+#include <linux/ptrace.h>
+#include <linux/mm.h>
+
+asmlinkage int
+do_solaris_syscall (struct pt_regs *regs)
+{
+	current->personality = PER_SVR4;
+	current->exec_domain = lookup_exec_domain(PER_SVR4);
+
+	if (current->exec_domain && current->exec_domain->handler){
+		current->exec_domain->handler (regs);
+		current->exec_domain->use_count = 0;
+		return regs->u_regs [UREG_I0];
+	}
+	printk ("No solaris handler\n");
+	send_sig (SIGSEGV, current, 1);
+	return 0;
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov