aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/sys_sparc32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/sys_sparc32.c')
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 7f6239ed252..9264ccbaaaf 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -11,6 +11,7 @@
11#include <linux/config.h> 11#include <linux/config.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/capability.h>
14#include <linux/fs.h> 15#include <linux/fs.h>
15#include <linux/mm.h> 16#include <linux/mm.h>
16#include <linux/file.h> 17#include <linux/file.h>
@@ -820,7 +821,7 @@ asmlinkage long sys32_utimes(char __user *filename,
820 return -EFAULT; 821 return -EFAULT;
821 } 822 }
822 823
823 return do_utimes(filename, (tvs ? &ktvs[0] : NULL)); 824 return do_utimes(AT_FDCWD, filename, (tvs ? &ktvs[0] : NULL));
824} 825}
825 826
826/* These are here just in case some old sparc32 binary calls it. */ 827/* These are here just in case some old sparc32 binary calls it. */
@@ -1002,7 +1003,7 @@ asmlinkage long sys32_adjtimex(struct timex32 __user *utp)
1002asmlinkage long sparc32_open(const char __user *filename, 1003asmlinkage long sparc32_open(const char __user *filename,
1003 int flags, int mode) 1004 int flags, int mode)
1004{ 1005{
1005 return do_sys_open(filename, flags, mode); 1006 return do_sys_open(AT_FDCWD, filename, flags, mode);
1006} 1007}
1007 1008
1008extern unsigned long do_mremap(unsigned long addr, 1009extern unsigned long do_mremap(unsigned long addr,
@@ -1120,39 +1121,3 @@ long sys32_lookup_dcookie(unsigned long cookie_high,
1120 return sys_lookup_dcookie((cookie_high << 32) | cookie_low, 1121 return sys_lookup_dcookie((cookie_high << 32) | cookie_low,
1121 buf, len); 1122 buf, len);
1122} 1123}
1123
1124extern asmlinkage long
1125sys_timer_create(clockid_t which_clock,
1126 struct sigevent __user *timer_event_spec,
1127 timer_t __user *created_timer_id);
1128
1129long
1130sys32_timer_create(u32 clock, struct compat_sigevent __user *se32,
1131 timer_t __user *timer_id)
1132{
1133 struct sigevent se;
1134 mm_segment_t oldfs;
1135 timer_t t;
1136 long err;
1137
1138 if (se32 == NULL)
1139 return sys_timer_create(clock, NULL, timer_id);
1140
1141 if (get_compat_sigevent(&se, se32))
1142 return -EFAULT;
1143
1144 if (!access_ok(VERIFY_WRITE,timer_id,sizeof(timer_t)))
1145 return -EFAULT;
1146
1147 oldfs = get_fs();
1148 set_fs(KERNEL_DS);
1149 err = sys_timer_create(clock,
1150 (struct sigevent __user *) &se,
1151 (timer_t __user *) &t);
1152 set_fs(oldfs);
1153
1154 if (!err)
1155 err = __put_user (t, timer_id);
1156
1157 return err;
1158}