Page MenuHomeFreeBSD

D6759.diff
No OneTemporary

D6759.diff

Index: sys/compat/linux/linux_file.c
===================================================================
--- sys/compat/linux/linux_file.c
+++ sys/compat/linux/linux_file.c
@@ -230,7 +230,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_llseek(struct thread *td, struct linux_llseek_args *args)
{
@@ -269,7 +269,7 @@
lda.count = 1;
return (linux_getdents(td, &lda));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
/*
* Note that linux_getdents(2) and linux_getdents64(2) have the same
@@ -916,7 +916,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_truncate64(struct thread *td, struct linux_truncate64_args *args)
{
@@ -934,7 +934,7 @@
LFREEPATH(path);
return (error);
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_ftruncate(struct thread *td, struct linux_ftruncate_args *args)
@@ -1121,7 +1121,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_oldumount(struct thread *td, struct linux_oldumount_args *args)
{
@@ -1131,7 +1131,7 @@
args2.flags = 0;
return (linux_umount(td, &args2));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_umount(struct thread *td, struct linux_umount_args *args)
@@ -1203,7 +1203,7 @@
linux_flock->l_pid = (l_pid_t)bsd_flock->l_pid;
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
struct l_flock64 {
l_short l_type;
l_short l_whence;
@@ -1259,7 +1259,7 @@
linux_flock->l_len = (l_loff_t)bsd_flock->l_len;
linux_flock->l_pid = (l_pid_t)bsd_flock->l_pid;
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
static int
fcntl_common(struct thread *td, struct linux_fcntl_args *args)
@@ -1400,7 +1400,7 @@
return (fcntl_common(td, args));
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_fcntl64(struct thread *td, struct linux_fcntl64_args *args)
{
@@ -1452,7 +1452,7 @@
fcntl_args.arg = args->arg;
return (fcntl_common(td, &fcntl_args));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_chown(struct thread *td, struct linux_chown_args *args)
@@ -1536,6 +1536,7 @@
}
}
+#if !defined(__arm__)
int
linux_fadvise64(struct thread *td, struct linux_fadvise64_args *args)
{
@@ -1547,8 +1548,9 @@
return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
advice));
}
+#endif /* !__arm__ */
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_fadvise64_64(struct thread *td, struct linux_fadvise64_64_args *args)
{
@@ -1560,7 +1562,7 @@
return (kern_posix_fadvise(td, args->fd, args->offset, args->len,
advice));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_pipe(struct thread *td, struct linux_pipe_args *args)
Index: sys/compat/linux/linux_ipc.h
===================================================================
--- sys/compat/linux/linux_ipc.h
+++ sys/compat/linux/linux_ipc.h
@@ -177,6 +177,6 @@
int linux_shmdt(struct thread *, struct linux_shmdt_args *);
int linux_shmget(struct thread *, struct linux_shmget_args *);
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
#endif /* _LINUX_IPC_H_ */
Index: sys/compat/linux/linux_misc.c
===================================================================
--- sys/compat/linux/linux_misc.c
+++ sys/compat/linux/linux_misc.c
@@ -983,7 +983,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_waitpid(struct thread *td, struct linux_waitpid_args *args)
{
@@ -1002,7 +1002,7 @@
return (linux_wait4(td, &wait4_args));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_wait4(struct thread *td, struct linux_wait4_args *args)
@@ -1279,7 +1279,7 @@
return (copyout(&ls, uap->itv, sizeof(ls)));
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_nice(struct thread *td, struct linux_nice_args *args)
{
@@ -1290,7 +1290,7 @@
bsd_args.prio = args->inc;
return (sys_setpriority(td, &bsd_args));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_setgroups(struct thread *td, struct linux_setgroups_args *args)
@@ -1422,7 +1422,7 @@
return (kern_setrlimit(td, which, &bsd_rlim));
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_old_getrlimit(struct thread *td, struct linux_old_getrlimit_args *args)
{
@@ -1462,7 +1462,7 @@
#endif
return (copyout(&rlim, args->rlim, sizeof(rlim)));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_getrlimit(struct thread *td, struct linux_getrlimit_args *args)
Index: sys/compat/linux/linux_signal.c
===================================================================
--- sys/compat/linux/linux_signal.c
+++ sys/compat/linux/linux_signal.c
@@ -91,7 +91,7 @@
#ifdef COMPAT_LINUX32
lsa->lsa_handler = (uintptr_t)bsa->sa_handler;
#else
- lsa->lsa_handler = bsa->sa_handler;
+ lsa->lsa_handler = (l_handler_t)bsa->sa_handler;
#endif
lsa->lsa_restorer = 0; /* unsupported */
lsa->lsa_flags = 0;
@@ -139,7 +139,7 @@
return (0);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_signal(struct thread *td, struct linux_signal_args *args)
{
@@ -152,7 +152,7 @@
args->sig, (void *)(uintptr_t)args->handler);
#endif
- nsa.lsa_handler = args->handler;
+ nsa.lsa_handler = (l_handler_t )args->handler;
nsa.lsa_flags = LINUX_SA_ONESHOT | LINUX_SA_NOMASK;
LINUX_SIGEMPTYSET(nsa.lsa_mask);
@@ -161,7 +161,7 @@
return (error);
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_rt_sigaction(struct thread *td, struct linux_rt_sigaction_args *args)
@@ -231,7 +231,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_sigprocmask(struct thread *td, struct linux_sigprocmask_args *args)
{
@@ -263,7 +263,7 @@
return (error);
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_rt_sigprocmask(struct thread *td, struct linux_rt_sigprocmask_args *args)
@@ -298,7 +298,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_sgetmask(struct thread *td, struct linux_sgetmask_args *args)
{
@@ -364,7 +364,7 @@
mask = lset.__mask;
return (copyout(&mask, args->mask, sizeof(mask)));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
/*
* MPSAFE
Index: sys/compat/linux/linux_socket.c
===================================================================
--- sys/compat/linux/linux_socket.c
+++ sys/compat/linux/linux_socket.c
@@ -969,7 +969,7 @@
return (sys_socketpair(td, &bsd_args));
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
struct linux_send_args {
int s;
l_uintptr_t msg;
@@ -1025,7 +1025,7 @@
bsd_args.fromlenaddr = 0;
return (sys_recvfrom(td, &bsd_args));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_sendto(struct thread *td, struct linux_sendto_args *args)
@@ -1700,7 +1700,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
/* Argument list sizes for linux_socketcall */
@@ -1782,4 +1782,4 @@
uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);
return (ENOSYS);
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
Index: sys/compat/linux/linux_stats.c
===================================================================
--- sys/compat/linux/linux_stats.c
+++ sys/compat/linux/linux_stats.c
@@ -252,7 +252,7 @@
return (error);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
static int
stat_copyout(struct stat *buf, void *ubuf)
{
@@ -327,7 +327,7 @@
LFREEPATH(path);
return (stat_copyout(&buf, args->up));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
struct l_statfs {
l_long f_type;
@@ -384,7 +384,7 @@
static int
bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs)
{
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
uint64_t tmp;
#define LINUX_HIBITS 0xffffffff00000000ULL
@@ -396,7 +396,7 @@
(tmp & LINUX_HIBITS))
return (EOVERFLOW);
#undef LINUX_HIBITS
-#endif
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename);
linux_statfs->f_bsize = bsd_statfs->f_bsize;
linux_statfs->f_blocks = bsd_statfs->f_blocks;
@@ -435,7 +435,7 @@
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
static void
bsd_to_linux_statfs64(struct statfs *bsd_statfs, struct l_statfs64 *linux_statfs)
{
@@ -497,7 +497,7 @@
bsd_to_linux_statfs64(&bsd_statfs, &linux_statfs);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args)
@@ -538,7 +538,7 @@
return (EOPNOTSUPP);
}
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
static int
stat64_copyout(struct stat *buf, void *ubuf)
@@ -693,7 +693,7 @@
return (error);
}
-#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
int
linux_syncfs(struct thread *td, struct linux_syncfs_args *args)
Index: sys/compat/linux/linux_vdso.c
===================================================================
--- sys/compat/linux/linux_vdso.c
+++ sys/compat/linux/linux_vdso.c
@@ -29,11 +29,11 @@
#include "opt_compat.h"
-#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
#define __ELF_WORD_SIZE 32
#else
#define __ELF_WORD_SIZE 64
-#endif
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
#include <sys/param.h>
#include <sys/systm.h>

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 3:27 AM (22 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14689076
Default Alt Text
D6759.diff (12 KB)

Event Timeline