diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-03-26 04:37:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:56:57 -0500 |
commit | 3158e9411a66fb98d495ac441c242264f31aaf3e (patch) | |
tree | 7b3bad47214c09c9dcd7ff27316c6de23f4c7cb0 /arch/s390/kernel/compat_linux.c | |
parent | 88959ea968709c35e8b979ac9f5a398fa748091a (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/s390/kernel/compat_linux.c')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 9809264f2f4d..5e14de37c17b 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/resource.h> | 26 | #include <linux/resource.h> |
27 | #include <linux/times.h> | 27 | #include <linux/times.h> |
28 | #include <linux/utsname.h> | 28 | #include <linux/utsname.h> |
29 | #include <linux/timex.h> | ||
30 | #include <linux/smp.h> | 29 | #include <linux/smp.h> |
31 | #include <linux/smp_lock.h> | 30 | #include <linux/smp_lock.h> |
32 | #include <linux/sem.h> | 31 | #include <linux/sem.h> |
@@ -705,66 +704,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | |||
705 | return ret; | 704 | return ret; |
706 | } | 705 | } |
707 | 706 | ||
708 | /* Handle adjtimex compatibility. */ | ||
709 | |||
710 | extern int do_adjtimex(struct timex *); | ||
711 | |||
712 | asmlinkage long sys32_adjtimex(struct compat_timex __user *utp) | ||
713 | { | ||
714 | struct timex txc; | ||
715 | int ret; | ||
716 | |||
717 | memset(&txc, 0, sizeof(struct timex)); | ||
718 | |||
719 | if(get_user(txc.modes, &utp->modes) || | ||
720 | __get_user(txc.offset, &utp->offset) || | ||
721 | __get_user(txc.freq, &utp->freq) || | ||
722 | __get_user(txc.maxerror, &utp->maxerror) || | ||
723 | __get_user(txc.esterror, &utp->esterror) || | ||
724 | __get_user(txc.status, &utp->status) || | ||
725 | __get_user(txc.constant, &utp->constant) || | ||
726 | __get_user(txc.precision, &utp->precision) || | ||
727 | __get_user(txc.tolerance, &utp->tolerance) || | ||
728 | __get_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
729 | __get_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
730 | __get_user(txc.tick, &utp->tick) || | ||
731 | __get_user(txc.ppsfreq, &utp->ppsfreq) || | ||
732 | __get_user(txc.jitter, &utp->jitter) || | ||
733 | __get_user(txc.shift, &utp->shift) || | ||
734 | __get_user(txc.stabil, &utp->stabil) || | ||
735 | __get_user(txc.jitcnt, &utp->jitcnt) || | ||
736 | __get_user(txc.calcnt, &utp->calcnt) || | ||
737 | __get_user(txc.errcnt, &utp->errcnt) || | ||
738 | __get_user(txc.stbcnt, &utp->stbcnt)) | ||
739 | return -EFAULT; | ||
740 | |||
741 | ret = do_adjtimex(&txc); | ||
742 | |||
743 | if(put_user(txc.modes, &utp->modes) || | ||
744 | __put_user(txc.offset, &utp->offset) || | ||
745 | __put_user(txc.freq, &utp->freq) || | ||
746 | __put_user(txc.maxerror, &utp->maxerror) || | ||
747 | __put_user(txc.esterror, &utp->esterror) || | ||
748 | __put_user(txc.status, &utp->status) || | ||
749 | __put_user(txc.constant, &utp->constant) || | ||
750 | __put_user(txc.precision, &utp->precision) || | ||
751 | __put_user(txc.tolerance, &utp->tolerance) || | ||
752 | __put_user(txc.time.tv_sec, &utp->time.tv_sec) || | ||
753 | __put_user(txc.time.tv_usec, &utp->time.tv_usec) || | ||
754 | __put_user(txc.tick, &utp->tick) || | ||
755 | __put_user(txc.ppsfreq, &utp->ppsfreq) || | ||
756 | __put_user(txc.jitter, &utp->jitter) || | ||
757 | __put_user(txc.shift, &utp->shift) || | ||
758 | __put_user(txc.stabil, &utp->stabil) || | ||
759 | __put_user(txc.jitcnt, &utp->jitcnt) || | ||
760 | __put_user(txc.calcnt, &utp->calcnt) || | ||
761 | __put_user(txc.errcnt, &utp->errcnt) || | ||
762 | __put_user(txc.stbcnt, &utp->stbcnt)) | ||
763 | ret = -EFAULT; | ||
764 | |||
765 | return ret; | ||
766 | } | ||
767 | |||
768 | #ifdef CONFIG_SYSCTL | 707 | #ifdef CONFIG_SYSCTL |
769 | struct __sysctl_args32 { | 708 | struct __sysctl_args32 { |
770 | u32 name; | 709 | u32 name; |