diff options
author | obrien <obrien@FreeBSD.org> | 2005-01-14 04:44:56 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2005-01-14 04:44:56 +0000 |
commit | 98e2482a94352fb526a94972423b2c3dc3ebae6f (patch) | |
tree | 7693b8c47d75fd22d8d433e7bb6138b5e9b985a0 /sys/compat | |
parent | 98c3a8a894b937803df272ee68fb791709bc75d5 (diff) | |
download | FreeBSD-src-98e2482a94352fb526a94972423b2c3dc3ebae6f.zip FreeBSD-src-98e2482a94352fb526a94972423b2c3dc3ebae6f.tar.gz |
Match the LINUX32's style with existing style
Submitted by: Jung-uk Kim <jkim@niksun.com>
Use positive, not negative logic.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_file.c | 16 | ||||
-rw-r--r-- | sys/compat/linux/linux_getcwd.c | 8 | ||||
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 10 | ||||
-rw-r--r-- | sys/compat/linux/linux_ipc.c | 18 | ||||
-rw-r--r-- | sys/compat/linux/linux_mib.c | 6 | ||||
-rw-r--r-- | sys/compat/linux/linux_misc.c | 26 | ||||
-rw-r--r-- | sys/compat/linux/linux_signal.c | 10 | ||||
-rw-r--r-- | sys/compat/linux/linux_socket.c | 8 | ||||
-rw-r--r-- | sys/compat/linux/linux_stats.c | 12 | ||||
-rw-r--r-- | sys/compat/linux/linux_sysctl.c | 8 | ||||
-rw-r--r-- | sys/compat/linux/linux_uid16.c | 8 |
12 files changed, 68 insertions, 68 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 912e21a..cbeba1a 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -92,10 +92,10 @@ extern int ncpus; #endif /* __i386__ || __amd64__ */ #include "opt_compat.h" -#if !COMPAT_LINUX32 /* XXX */ -#include <machine/../linux/linux.h> -#else +#ifdef COMPAT_LINUX32 /* XXX */ #include <machine/../linux32/linux.h> +#else +#include <machine/../linux/linux.h> #endif #include <compat/linux/linux_ioctl.h> #include <compat/linux/linux_mib.h> diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index dbbf885..bd81cab 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -56,12 +56,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_util.h> @@ -833,7 +833,7 @@ struct l_flock { l_off_t l_len; l_pid_t l_pid; } -#if __amd64__ && COMPAT_LINUX32 +#if defined(__amd64__) && defined(COMPAT_LINUX32) __packed #endif ; @@ -881,7 +881,7 @@ bsd_to_linux_flock(struct flock *bsd_flock, struct l_flock *linux_flock) linux_flock->l_pid = (l_pid_t)bsd_flock->l_pid; } -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) struct l_flock64 { l_short l_type; l_short l_whence; @@ -889,7 +889,7 @@ struct l_flock64 { l_loff_t l_len; l_pid_t l_pid; } -#if __amd64__ && COMPAT_LINUX32 +#if defined(__amd64__) && defined(COMPAT_LINUX32) __packed #endif ; @@ -1064,7 +1064,7 @@ linux_fcntl(struct thread *td, struct linux_fcntl_args *args) return (fcntl_common(td, &args64)); } -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) int linux_fcntl64(struct thread *td, struct linux_fcntl64_args *args) { diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 1bb137e..efc719b 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -61,12 +61,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_util.h> diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index cf5e27f..beb9e0c 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -58,12 +58,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_ioctl.h> @@ -2088,7 +2088,7 @@ ifname_linux_to_bsd(const char *lxname, char *bsdname) static int linux_ifconf(struct thread *td, struct ifconf *uifc) { -#if COMPAT_LINUX32 +#ifdef COMPAT_LINUX32 struct l_ifconf ifc; #else struct ifconf ifc; diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 04dc772..662669d 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -41,14 +41,14 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#include <machine/../linux/linux_ipc64.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> #include <machine/../linux32/linux32_ipc64.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> +#include <machine/../linux/linux_ipc64.h> #endif #include <compat/linux/linux_ipc.h> #include <compat/linux/linux_util.h> @@ -154,7 +154,7 @@ struct l_msqid_ds { l_pid_t msg_lspid; /* pid of last msgsnd */ l_pid_t msg_lrpid; /* last receive pid */ } -#if __amd64__ && COMPAT_LINUX32 +#if defined(__amd64__) && defined(COMPAT_LINUX32) __packed #endif ; @@ -169,7 +169,7 @@ struct l_semid_ds { l_uintptr_t undo; l_ushort sem_nsems; } -#if __amd64__ && COMPAT_LINUX32 +#if defined(__amd64__) && defined(COMPAT_LINUX32) __packed #endif ; @@ -677,7 +677,7 @@ linux_shmat(struct thread *td, struct linux_shmat_args *args) int shmflg; } */ bsd_args; int error; -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) l_uintptr_t addr; #endif @@ -686,7 +686,7 @@ linux_shmat(struct thread *td, struct linux_shmat_args *args) bsd_args.shmflg = args->shmflg; if ((error = shmat(td, &bsd_args))) return error; -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) addr = td->td_retval[0]; if ((error = copyout(&addr, PTRIN(args->raddr), sizeof(addr)))) return error; diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index 8ebf68d..916e8ea 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -41,10 +41,10 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> +#else +#include <machine/../linux/linux.h> #endif #include <compat/linux/linux_mib.h> diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 6668841..0921907 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -74,12 +74,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_mib.h> @@ -777,7 +777,7 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args) return (copyout(&utsname, args->buf, sizeof(utsname))); } -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) struct l_utimbuf { l_time_t l_actime; l_time_t l_modtime; @@ -1205,20 +1205,20 @@ linux_old_getrlimit(struct thread *td, struct linux_old_getrlimit_args *args) lim_rlimit(p, which, &bsd_rlim); PROC_UNLOCK(p); -#if !COMPAT_LINUX32 - rlim.rlim_cur = (unsigned long)bsd_rlim.rlim_cur; - if (rlim.rlim_cur == ULONG_MAX) - rlim.rlim_cur = LONG_MAX; - rlim.rlim_max = (unsigned long)bsd_rlim.rlim_max; - if (rlim.rlim_max == ULONG_MAX) - rlim.rlim_max = LONG_MAX; -#else +#ifdef COMPAT_LINUX32 rlim.rlim_cur = (unsigned int)bsd_rlim.rlim_cur; if (rlim.rlim_cur == UINT_MAX) rlim.rlim_cur = INT_MAX; rlim.rlim_max = (unsigned int)bsd_rlim.rlim_max; if (rlim.rlim_max == UINT_MAX) rlim.rlim_max = INT_MAX; +#else + rlim.rlim_cur = (unsigned long)bsd_rlim.rlim_cur; + if (rlim.rlim_cur == ULONG_MAX) + rlim.rlim_cur = LONG_MAX; + rlim.rlim_max = (unsigned long)bsd_rlim.rlim_max; + if (rlim.rlim_max == ULONG_MAX) + rlim.rlim_max = LONG_MAX; #endif return (copyout(&rlim, args->rlim, sizeof(rlim))); } diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 6753524..fc25e3f 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -40,12 +40,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_signal.h> #include <compat/linux/linux_util.h> @@ -120,7 +120,7 @@ bsd_to_linux_sigaction(struct sigaction *bsa, l_sigaction_t *lsa) { bsd_to_linux_sigset(&bsa->sa_mask, &lsa->lsa_mask); -#if COMPAT_LINUX32 +#ifdef COMPAT_LINUX32 lsa->lsa_handler = (uintptr_t)bsa->sa_handler; #else lsa->lsa_handler = bsa->sa_handler; diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 8233db1..1770edd 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -62,12 +62,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_socket.h> #include <compat/linux/linux_util.h> diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 213732d..255eb74 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -47,12 +47,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_util.h> @@ -402,7 +402,7 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) return (copyout(&lu, args->ubuf, sizeof(lu))); } -#if defined(__i386__) || (defined(__amd64__) && COMPAT_LINUX32) +#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) static int stat64_copyout(struct stat *buf, void *ubuf) @@ -544,4 +544,4 @@ linux_fstat64(struct thread *td, struct linux_fstat64_args *args) return (error); } -#endif /* __i386__ || __amd64__ */ +#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index 72bc1c4..f20a1de 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -40,12 +40,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_util.h> diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index 83543ee..52a6df2 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -38,12 +38,12 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#if !COMPAT_LINUX32 -#include <machine/../linux/linux.h> -#include <machine/../linux/linux_proto.h> -#else +#ifdef COMPAT_LINUX32 #include <machine/../linux32/linux.h> #include <machine/../linux32/linux32_proto.h> +#else +#include <machine/../linux/linux.h> +#include <machine/../linux/linux_proto.h> #endif #include <compat/linux/linux_util.h> |