Module Name: src
Committed By: pooka
Date: Thu Mar 7 18:53:40 UTC 2013
Modified Files:
src/sys/rump/kern/lib/libsys_linux: Makefile component.c
Log Message:
If linux syscall emulation is linked in to a rump kernel, use it as the
default emulation.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_linux/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/kern/lib/libsys_linux/component.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/rump/kern/lib/libsys_linux/Makefile
diff -u src/sys/rump/kern/lib/libsys_linux/Makefile:1.1 src/sys/rump/kern/lib/libsys_linux/Makefile:1.2
--- src/sys/rump/kern/lib/libsys_linux/Makefile:1.1 Wed Sep 19 21:45:40 2012
+++ src/sys/rump/kern/lib/libsys_linux/Makefile Thu Mar 7 18:53:39 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/09/19 21:45:40 pooka Exp $
+# $NetBSD: Makefile,v 1.2 2013/03/07 18:53:39 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../compat/linux/common
@@ -13,7 +13,7 @@ SRCS= linux_blkio.c linux_cdrom.c linux_
SRCS+= rump_linux_sysent.c component.c
# XXX
-CPPFLAGS+= -I${.CURDIR}
+CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
Index: src/sys/rump/kern/lib/libsys_linux/component.c
diff -u src/sys/rump/kern/lib/libsys_linux/component.c:1.3 src/sys/rump/kern/lib/libsys_linux/component.c:1.4
--- src/sys/rump/kern/lib/libsys_linux/component.c:1.3 Sat Nov 17 16:38:22 2012
+++ src/sys/rump/kern/lib/libsys_linux/component.c Thu Mar 7 18:53:40 2013
@@ -1,10 +1,12 @@
-/* $NetBSD: component.c,v 1.3 2012/11/17 16:38:22 pooka Exp $ */
+/* $NetBSD: component.c,v 1.4 2013/03/07 18:53:40 pooka Exp $ */
#include <sys/param.h>
#include <sys/proc.h>
#include <uvm/uvm_extern.h>
+#include "rump_private.h"
+
extern struct sysent rump_linux_sysent[];
struct emul emul_rump_sys_linux = {
@@ -16,6 +18,13 @@ struct emul emul_rump_sys_linux = {
#endif
};
+RUMP_COMPONENT(RUMP_COMPONENT_KERN)
+{
+ extern struct emul *emul_default;
+
+ emul_default = &emul_rump_sys_linux;
+}
+
/*
* XXX: the linux emulation code is not split into factions
*/