summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_file.c
diff options
context:
space:
mode:
authormanu <manu@NetBSD.org>2005-05-03 16:26:27 +0000
committermanu <manu@NetBSD.org>2005-05-03 16:26:27 +0000
commit89647c7ca6f19d5682117c3285ebb8c8ba833a59 (patch)
tree2cc8787cfddb0914a698128c37c6b96bea19899a /sys/compat/linux/common/linux_file.c
parent6c6d96d112084303316c8cb293d4b2e4b1987097 (diff)
First work on COMPAT_LINUX/amd64
Process startup and dynamiclinking work, but processes hang due to Linux arch_prctl(2) not being really supported yet.
Diffstat (limited to 'sys/compat/linux/common/linux_file.c')
-rw-r--r--sys/compat/linux/common/linux_file.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/sys/compat/linux/common/linux_file.c b/sys/compat/linux/common/linux_file.c
index 5807e8ac7b8..a3475771c8a 100644
--- a/sys/compat/linux/common/linux_file.c
+++ b/sys/compat/linux/common/linux_file.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file.c,v 1.66 2005/03/10 14:12:28 christos Exp $ */
+/* $NetBSD: linux_file.c,v 1.67 2005/05/03 16:26:28 manu Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.66 2005/03/10 14:12:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file.c,v 1.67 2005/05/03 16:26:28 manu Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -76,8 +76,10 @@ static int linux_to_bsd_ioflags __P((int));
static int bsd_to_linux_ioflags __P((int));
static void bsd_to_linux_flock __P((struct flock *, struct linux_flock *));
static void linux_to_bsd_flock __P((struct linux_flock *, struct flock *));
+#ifndef __amd64__
static void bsd_to_linux_stat __P((struct stat *, struct linux_stat *));
static int linux_stat1 __P((struct lwp *, void *, register_t *, int));
+#endif
/*
* Some file-related calls are handled here. The usual flag conversion
@@ -485,6 +487,7 @@ linux_sys_fcntl(l, v, retval)
return sys_fcntl(l, &fca, retval);
}
+#if !defined(__amd64__)
/*
* Convert a NetBSD stat structure to a Linux stat structure.
* Only the order of the fields and the padding in the structure
@@ -633,6 +636,7 @@ linux_sys_lstat(l, v, retval)
return linux_stat1(l, uap, retval, 1);
}
+#endif /* !__amd64__ */
/*
* The following syscalls are mostly here because of the alternate path check.
@@ -773,7 +777,8 @@ linux_sys_chmod(l, v, retval)
return sys_chmod(l, uap, retval);
}
-#if defined(__i386__) || defined(__m68k__) || defined(__arm__)
+#if defined(__i386__) || defined(__m68k__) || \
+ defined(__arm__)
int
linux_sys_chown16(l, v, retval)
struct lwp *l;
@@ -847,9 +852,9 @@ linux_sys_lchown16(l, v, retval)
return sys___posix_lchown(l, &bla, retval);
}
-#endif /* __i386__ || __m68k__ || __arm__ */
-#if defined (__i386__) || defined (__m68k__) || \
- defined (__powerpc__) || defined (__mips__) || defined(__arm__)
+#endif /* __i386__ || __m68k__ || __arm__ || __amd64__ */
+#if defined (__i386__) || defined (__m68k__) || defined(__amd64__) || \
+ defined (__powerpc__) || defined (__mips__) || defined (__arm__)
int
linux_sys_chown(l, v, retval)
struct lwp *l;
@@ -887,7 +892,7 @@ linux_sys_lchown(l, v, retval)
return sys___posix_lchown(l, uap, retval);
}
-#endif /* __i386__ || __m68k__ || __powerpc__ || __mips__ || __arm__ */
+#endif /* __i386__||__m68k__||__powerpc__||__mips__||__arm__ ||__amd64__ */
int
linux_sys_rename(l, v, retval)
@@ -1000,6 +1005,7 @@ linux_sys_readlink(l, v, retval)
return sys_readlink(l, uap, retval);
}
+#if !defined(__amd64__)
int
linux_sys_truncate(l, v, retval)
struct lwp *l;
@@ -1017,6 +1023,7 @@ linux_sys_truncate(l, v, retval)
return compat_43_sys_truncate(l, uap, retval);
}
+#endif /* !__amd64__ */
/*
* This is just fsync() for now (just as it is in the Linux kernel)