Module Name: src
Committed By: pooka
Date: Mon Jul 19 15:35:39 UTC 2010
Modified Files:
src/lib/libukfs: ukfs.c
src/tests/fs/umapfs: t_basic.c
src/tests/fs/vfs: t_vnops.c
Log Message:
convert to newstyle automagic rump compat syscalls
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/libukfs/ukfs.c
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/umapfs/t_basic.c
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/vfs/t_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libukfs/ukfs.c
diff -u src/lib/libukfs/ukfs.c:1.51 src/lib/libukfs/ukfs.c:1.52
--- src/lib/libukfs/ukfs.c:1.51 Thu Jun 24 13:03:05 2010
+++ src/lib/libukfs/ukfs.c Mon Jul 19 15:35:38 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ukfs.c,v 1.51 2010/06/24 13:03:05 hannken Exp $ */
+/* $NetBSD: ukfs.c,v 1.52 2010/07/19 15:35:38 pooka Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -1034,40 +1034,13 @@
return rv;
}
-/*
- * If we want to use post-time_t file systems on pre-time_t hosts,
- * we must translate the stat structure. Since we don't currently
- * have a general method for making compat calls in rump, special-case
- * this one.
- *
- * Note that this does not allow making system calls to older rump
- * kernels from newer hosts.
- */
-#define VERS_TIMECHANGE 599000700
-
-static int
-needcompat(void)
-{
-
-#ifdef __NetBSD__
- /*LINTED*/
- return __NetBSD_Version__ < VERS_TIMECHANGE
- && rump_pub_getversion() >= VERS_TIMECHANGE;
-#else
- return 0;
-#endif
-}
-
int
ukfs_stat(struct ukfs *ukfs, const char *filename, struct stat *file_stat)
{
int rv;
precall(ukfs);
- if (needcompat())
- rv = rump_pub_sys___stat30(filename, file_stat);
- else
- rv = rump_sys_stat(filename, file_stat);
+ rv = rump_sys_stat(filename, file_stat);
postcall(ukfs);
return rv;
@@ -1079,10 +1052,7 @@
int rv;
precall(ukfs);
- if (needcompat())
- rv = rump_pub_sys___lstat30(filename, file_stat);
- else
- rv = rump_sys_lstat(filename, file_stat);
+ rv = rump_sys_lstat(filename, file_stat);
postcall(ukfs);
return rv;
Index: src/tests/fs/umapfs/t_basic.c
diff -u src/tests/fs/umapfs/t_basic.c:1.3 src/tests/fs/umapfs/t_basic.c:1.4
--- src/tests/fs/umapfs/t_basic.c:1.3 Mon May 31 23:44:54 2010
+++ src/tests/fs/umapfs/t_basic.c Mon Jul 19 15:35:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: t_basic.c,v 1.3 2010/05/31 23:44:54 pooka Exp $ */
+/* $NetBSD: t_basic.c,v 1.4 2010/07/19 15:35:39 pooka Exp $ */
#include <sys/types.h>
#include <sys/param.h>
@@ -28,13 +28,6 @@
atf_tc_set_md_var(tc, "descr", "basic umapfs mapping");
}
-/* deal with time_t change for running this on 5.0 */
-#if __NetBSD_Prereq__(5,99,7)
-#define statfn rump_sys_stat
-#else
-#define statfn rump_pub_sys___stat30
-#endif
-
static void
xtouch(const char *path)
{
@@ -59,7 +52,7 @@
{
struct stat sb;
- if (statfn(path, &sb) == -1)
+ if (rump_sys_stat(path, &sb) == -1)
atf_tc_fail_errno("stat %s", path);
if (uid != (uid_t)-1) {
if (sb.st_uid != uid)
Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.3 src/tests/fs/vfs/t_vnops.c:1.4
--- src/tests/fs/vfs/t_vnops.c:1.3 Fri Jul 16 19:16:41 2010
+++ src/tests/fs/vfs/t_vnops.c Mon Jul 19 15:35:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vnops.c,v 1.3 2010/07/16 19:16:41 pooka Exp $ */
+/* $NetBSD: t_vnops.c,v 1.4 2010/07/19 15:35:39 pooka Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -40,11 +40,6 @@
#include "../common/h_fsmacros.h"
#include "../../h_macros.h"
-/* make work when run with 5.0 userland */
-#if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 599000700)
-#define rump_sys_stat rump_pub_sys___stat30
-#endif
-
#define USES_DIRS \
if (FSTYPE_SYSVBFS(tc)) atf_tc_skip("dirs not supported by file system")