aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sys_sparc32.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-03-26 04:37:29 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:57 -0500
commit3158e9411a66fb98d495ac441c242264f31aaf3e (patch)
tree7b3bad47214c09c9dcd7ff27316c6de23f4c7cb0 /arch/sparc64/kernel/sys_sparc32.c
parent88959ea968709c35e8b979ac9f5a398fa748091a (diff)
[PATCH] consolidate sys32/compat_adjtimex
Create compat_sys_adjtimex and use it an all appropriate places. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc64/kernel/sys_sparc32.c')
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 48f02f201918..2e906bad56fa 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -19,7 +19,6 @@
19#include <linux/resource.h> 19#include <linux/resource.h>
20#include <linux/times.h> 20#include <linux/times.h>
21#include <linux/utsname.h> 21#include <linux/utsname.h>
22#include <linux/timex.h>
23#include <linux/smp.h> 22#include <linux/smp.h>
24#include <linux/smp_lock.h> 23#include <linux/smp_lock.h>
25#include <linux/sem.h> 24#include <linux/sem.h>
@@ -945,66 +944,6 @@ asmlinkage long compat_sys_sendfile64(int out_fd, int in_fd,
945 return ret; 944 return ret;
946} 945}
947 946
948/* Handle adjtimex compatibility. */
949
950extern int do_adjtimex(struct timex *);
951
952asmlinkage long sys32_adjtimex(struct compat_timex __user *utp)
953{
954 struct timex txc;
955 int ret;
956
957 memset(&txc, 0, sizeof(struct timex));
958
959 if (get_user(txc.modes, &utp->modes) ||
960 __get_user(txc.offset, &utp->offset) ||
961 __get_user(txc.freq, &utp->freq) ||
962 __get_user(txc.maxerror, &utp->maxerror) ||
963 __get_user(txc.esterror, &utp->esterror) ||
964 __get_user(txc.status, &utp->status) ||
965 __get_user(txc.constant, &utp->constant) ||
966 __get_user(txc.precision, &utp->precision) ||
967 __get_user(txc.tolerance, &utp->tolerance) ||
968 __get_user(txc.time.tv_sec, &utp->time.tv_sec) ||
969 __get_user(txc.time.tv_usec, &utp->time.tv_usec) ||
970 __get_user(txc.tick, &utp->tick) ||
971 __get_user(txc.ppsfreq, &utp->ppsfreq) ||
972 __get_user(txc.jitter, &utp->jitter) ||
973 __get_user(txc.shift, &utp->shift) ||
974 __get_user(txc.stabil, &utp->stabil) ||
975 __get_user(txc.jitcnt, &utp->jitcnt) ||
976 __get_user(txc.calcnt, &utp->calcnt) ||
977 __get_user(txc.errcnt, &utp->errcnt) ||
978 __get_user(txc.stbcnt, &utp->stbcnt))
979 return -EFAULT;
980
981 ret = do_adjtimex(&txc);
982
983 if (put_user(txc.modes, &utp->modes) ||
984 __put_user(txc.offset, &utp->offset) ||
985 __put_user(txc.freq, &utp->freq) ||
986 __put_user(txc.maxerror, &utp->maxerror) ||
987 __put_user(txc.esterror, &utp->esterror) ||
988 __put_user(txc.status, &utp->status) ||
989 __put_user(txc.constant, &utp->constant) ||
990 __put_user(txc.precision, &utp->precision) ||
991 __put_user(txc.tolerance, &utp->tolerance) ||
992 __put_user(txc.time.tv_sec, &utp->time.tv_sec) ||
993 __put_user(txc.time.tv_usec, &utp->time.tv_usec) ||
994 __put_user(txc.tick, &utp->tick) ||
995 __put_user(txc.ppsfreq, &utp->ppsfreq) ||
996 __put_user(txc.jitter, &utp->jitter) ||
997 __put_user(txc.shift, &utp->shift) ||
998 __put_user(txc.stabil, &utp->stabil) ||
999 __put_user(txc.jitcnt, &utp->jitcnt) ||
1000 __put_user(txc.calcnt, &utp->calcnt) ||
1001 __put_user(txc.errcnt, &utp->errcnt) ||
1002 __put_user(txc.stbcnt, &utp->stbcnt))
1003 ret = -EFAULT;
1004
1005 return ret;
1006}
1007
1008/* This is just a version for 32-bit applications which does 947/* This is just a version for 32-bit applications which does
1009 * not force O_LARGEFILE on. 948 * not force O_LARGEFILE on.
1010 */ 949 */