Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump do 5.0 compat for fstat
details: https://anonhg.NetBSD.org/src/rev/56cfa9d8ca6b
branches: trunk
changeset: 757449:56cfa9d8ca6b
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Aug 30 10:08:39 2010 +0000
description:
do 5.0 compat for fstat
diffstat:
sys/rump/include/rump/rump_syscalls_compat.h | 4 +++-
sys/rump/librump/rumpvfs/compat.c | 24 ++++++++++++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
diffs (70 lines):
diff -r c25f0c084527 -r 56cfa9d8ca6b sys/rump/include/rump/rump_syscalls_compat.h
--- a/sys/rump/include/rump/rump_syscalls_compat.h Mon Aug 30 09:44:40 2010 +0000
+++ b/sys/rump/include/rump/rump_syscalls_compat.h Mon Aug 30 10:08:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls_compat.h,v 1.3 2010/07/26 11:52:25 pooka Exp $ */
+/* $NetBSD: rump_syscalls_compat.h,v 1.4 2010/08/30 10:08:39 pooka Exp $ */
/*-
* Copyright (c) 2010 Antti Kantee. All Rights Reserved.
@@ -42,6 +42,7 @@
#if !__NetBSD_Prereq__(5,99,7)
#define rump_sys_stat(a,b) rump_sys_nb5_stat(a,b)
#define rump_sys_lstat(a,b) rump_sys_nb5_lstat(a,b)
+#define rump_sys_fstat(a,b) rump_sys_nb5_fstat(a,b)
#define rump_sys_pollts(a,b,c,d) rump_sys_nb5_pollts(a,b,c,d)
#define rump_sys_select(a,b,c,d,e) rump_sys_nb5_select(a,b,c,d,e)
#endif /* __NetBSD_Prereq */
@@ -57,6 +58,7 @@
struct timespec;
int rump_sys_nb5_stat(const char *, struct stat *);
int rump_sys_nb5_lstat(const char *, struct stat *);
+int rump_sys_nb5_fstat(int, struct stat *);
int rump_sys_nb5_pollts(struct pollfd *, size_t,
const struct timespec *, const void *);
int rump_sys_nb5_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
diff -r c25f0c084527 -r 56cfa9d8ca6b sys/rump/librump/rumpvfs/compat.c
--- a/sys/rump/librump/rumpvfs/compat.c Mon Aug 30 09:44:40 2010 +0000
+++ b/sys/rump/librump/rumpvfs/compat.c Mon Aug 30 10:08:39 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.6 2010/07/19 15:33:16 pooka Exp $ */
+/* $NetBSD: compat.c,v 1.7 2010/08/30 10:08:39 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.6 2010/07/19 15:33:16 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat.c,v 1.7 2010/08/30 10:08:39 pooka Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -120,6 +120,26 @@
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;
+}
+
/*
* XXX: types. But I don't want to start playing compat games in
* the userspace namespace too
Home |
Main Index |
Thread Index |
Old Index