Module Name: src
Committed By: pooka
Date: Mon Jan 17 16:20:20 UTC 2011
Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern
src/sys/rump/librump/rumpvfs: compat.c
Removed Files:
src/sys/rump/librump/rumpkern: compat.c
Log Message:
use compat code from sys/compat/common
To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.2 -r0 src/sys/rump/librump/rumpkern/compat.c
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpvfs/compat.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/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.106 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.107
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.106 Thu Jan 6 11:22:55 2011
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Mon Jan 17 16:20:20 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.106 2011/01/06 11:22:55 pooka Exp $
+# $NetBSD: Makefile.rumpkern,v 1.107 2011/01/17 16:20:20 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -10,7 +10,8 @@
${RUMPTOP}/../uvm \
${RUMPTOP}/../conf \
${RUMPTOP}/../dev \
- ${RUMPTOP}/../secmodel/suser
+ ${RUMPTOP}/../secmodel/suser \
+ ${RUMPTOP}/../compat/common
#
# Source modules, first the ones specifically implemented for librump.
@@ -18,7 +19,6 @@
SRCS= rump.c rumpcopy.c emul.c intr.c lwproc.c klock.c \
kobj_rename.c ltsleep.c memalloc.c scheduler.c \
signals.c sleepq.c threads.c vm.c
-SRCS+= compat.c
# Multiprocessor or uniprocessor locking. TODO: select right
# locking at runtime.
@@ -117,6 +117,9 @@
# sys/dev
SRCS+= clock_subr.c
+# compat
+SRCS+= kern_select_50.c
+
# Flip the comment to the other line if you want to use malloc(3)
# directly instead of the kernel allocators backed by malloc(3)/mmap(2).
# Libc malloc is a few percent faster, but doesn't emulate all kernel
Index: src/sys/rump/librump/rumpvfs/compat.c
diff -u src/sys/rump/librump/rumpvfs/compat.c:1.8 src/sys/rump/librump/rumpvfs/compat.c:1.9
--- src/sys/rump/librump/rumpvfs/compat.c:1.8 Tue Jan 4 17:00:19 2011
+++ src/sys/rump/librump/rumpvfs/compat.c Mon Jan 17 16:20:20 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.8 2011/01/04 17:00:19 pooka Exp $ */
+/* $NetBSD: compat.c,v 1.9 2011/01/17 16:20:20 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat.c,v 1.8 2011/01/04 17:00:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat.c,v 1.9 2011/01/17 16:20:20 pooka Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -80,126 +80,6 @@
long va_spare; /* remain quad aligned */
};
-int
-rump_sys_nb5_stat(const char *path, struct stat *sb)
-{
- struct compat_50_sys___stat30_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, path) = path;
- SPARG(&args, ub) = (struct stat30 *)sb;
-
- rump_schedule();
- error = compat_50_sys___stat30(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
-int
-rump_sys_nb5_lstat(const char *path, struct stat *sb)
-{
- struct compat_50_sys___lstat30_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, path) = path;
- SPARG(&args, ub) = (struct stat30 *)sb;
-
- rump_schedule();
- error = compat_50_sys___lstat30(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
-int
-rump_sys_nb5_fstat(int fd, struct stat *sb)
-{
- struct compat_50_sys___fstat30_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, fd) = fd;
- SPARG(&args, sb) = (struct stat30 *)sb;
-
- rump_schedule();
- error = compat_50_sys___fstat30(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
-int
-rump_sys_nb5_utimes(const char *path, const struct timeval times[2])
-{
- struct compat_50_sys_utimes_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, path) = path;
- SPARG(&args, tptr) = (const struct timeval50 *)times;
-
- rump_schedule();
- error = compat_50_sys_utimes(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
-int
-rump_sys_nb5_lutimes(const char *path, const struct timeval times[2])
-{
- struct compat_50_sys_lutimes_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, path) = path;
- SPARG(&args, tptr) = (const struct timeval50 *)times;
-
- rump_schedule();
- error = compat_50_sys_lutimes(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
-int
-rump_sys_nb5_futimes(int fd, const struct timeval times[2])
-{
- struct compat_50_sys_futimes_args args;
- register_t retval = 0;
- int error = 0;
-
- SPARG(&args, fd) = fd;
- SPARG(&args, tptr) = (const struct timeval50 *)times;
-
- rump_schedule();
- error = compat_50_sys_futimes(curlwp, &args, &retval);
- if (error) {
- retval = -1;
- rumpuser_seterrno(error);
- }
- rump_unschedule();
- return retval;
-}
-
/*
* XXX: types. But I don't want to start playing compat games in
* the userspace namespace too