Page MenuHomeFreeBSD

D7971.diff
No OneTemporary

D7971.diff

Index: sys/compat/linux/linux_file.h
===================================================================
--- sys/compat/linux/linux_file.h
+++ sys/compat/linux/linux_file.h
@@ -70,10 +70,17 @@
#define LINUX_O_NDELAY LINUX_O_NONBLOCK
#define LINUX_O_SYNC 00010000
#define LINUX_FASYNC 00020000
+#if defined(__arm__)
+#define LINUX_O_DIRECTORY 00040000
+#define LINUX_O_NOFOLLOW 00100000
+#define LINUX_O_DIRECT 00200000
+#define LINUX_O_LARGEFILE 00400000
+#else /* !defined(__arm__) */
#define LINUX_O_DIRECT 00040000 /* Direct disk access hint */
#define LINUX_O_LARGEFILE 00100000
#define LINUX_O_DIRECTORY 00200000 /* Must be a directory */
#define LINUX_O_NOFOLLOW 00400000 /* Do not follow links */
+#endif /* defined(__arm__) */
#define LINUX_O_NOATIME 01000000
#define LINUX_O_CLOEXEC 02000000
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)
{
@@ -259,6 +259,9 @@
return (0);
}
+#endif /* __i386__ || __arm__ || (__amd64__ && COMPAT_LINUX32) */
+
+#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_readdir(struct thread *td, struct linux_readdir_args *args)
{
@@ -916,7 +919,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 +937,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)
@@ -1201,7 +1204,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;
@@ -1257,7 +1260,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)
@@ -1398,7 +1401,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)
{
@@ -1450,7 +1453,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)
@@ -1534,6 +1537,7 @@
}
}
+#if !defined(__arm__)
int
linux_fadvise64(struct thread *td, struct linux_fadvise64_args *args)
{
@@ -1545,8 +1549,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)
{
@@ -1558,7 +1563,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
@@ -187,6 +187,7 @@
return (copyout(&sysinfo, args->info, sizeof(sysinfo)));
}
+#if !defined(__arm__)
int
linux_alarm(struct thread *td, struct linux_alarm_args *args)
{
@@ -221,6 +222,7 @@
td->td_retval[0] = old_it.it_value.tv_sec;
return (0);
}
+#endif /* !__arm__ */
int
linux_brk(struct thread *td, struct linux_brk_args *args)
@@ -649,6 +651,7 @@
return (sys_msync(td, &bsd_args));
}
+#if !defined(__arm__)
int
linux_time(struct thread *td, struct linux_time_args *args)
{
@@ -668,6 +671,7 @@
td->td_retval[0] = tm;
return (0);
}
+#endif /* !__arm__ */
struct l_times_argv {
l_clock_t tms_utime;
@@ -759,6 +763,7 @@
return (copyout(&utsname, args->buf, sizeof(utsname)));
}
+#if !defined(__arm__)
struct l_utimbuf {
l_time_t l_actime;
l_time_t l_modtime;
@@ -797,6 +802,7 @@
LFREEPATH(fname);
return (error);
}
+#endif /* !__arm__ */
int
linux_utimes(struct thread *td, struct linux_utimes_args *args)
@@ -1287,7 +1293,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)
{
@@ -1298,7 +1304,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)
Index: sys/compat/linux/linux_signal.c
===================================================================
--- sys/compat/linux/linux_signal.c
+++ sys/compat/linux/linux_signal.c
@@ -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)
@@ -342,6 +342,9 @@
return (0);
}
+#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
int
linux_sigpending(struct thread *td, struct linux_sigpending_args *args)
{
@@ -364,7 +367,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
@@ -977,7 +977,16 @@
int flags;
};
-static int
+struct linux_recv_args {
+ int s;
+ l_uintptr_t msg;
+ int len;
+ int flags;
+};
+#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
+
+#if defined(__i386__) || defined(__arm__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
+int
linux_send(struct thread *td, struct linux_send_args *args)
{
struct sendto_args /* {
@@ -998,14 +1007,7 @@
return (sys_sendto(td, &bsd_args));
}
-struct linux_recv_args {
- int s;
- l_uintptr_t msg;
- int len;
- int flags;
-};
-
-static int
+int
linux_recv(struct thread *td, struct linux_recv_args *args)
{
struct recvfrom_args /* {
@@ -1025,7 +1027,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)
Index: sys/compat/linux/linux_stats.c
===================================================================
--- sys/compat/linux/linux_stats.c
+++ sys/compat/linux/linux_stats.c
@@ -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
Sat, Jul 4, 9:37 AM (13 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34662857
Default Alt Text
D7971.diff (11 KB)

Event Timeline