fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / s390 / kernel / compat_linux.c
index e41ba9f..b8f77fd 100644 (file)
@@ -295,6 +295,7 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
  *
  * This is really horribly ugly.
  */
+#ifdef CONFIG_SYSVIPC
 asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr)
 {
        if (call >> 16)         /* hack for backward compatibility */
@@ -338,6 +339,7 @@ asmlinkage long sys32_ipc(u32 call, int first, int second, int third, u32 ptr)
 
        return -ENOSYS;
 }
+#endif
 
 asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low)
 {
@@ -546,10 +548,7 @@ sys32_execve(struct pt_regs regs)
        if (error == 0)
        {
                current->thread.fp_regs.fpc=0;
-               __asm__ __volatile__
-                       ("sr  0,0\n\t"
-                        "sfpc 0,0\n\t"
-                        : : :"0");
+               asm volatile("sfpc %0,0" : : "d" (0));
        }
         putname(filename);
 out:
@@ -598,7 +597,7 @@ asmlinkage long sys32_gettimeofday(struct compat_timeval __user *tv, struct time
 {
        if (tv) {
                struct timeval ktv;
-               do_gettimeofday(&ktv);
+               vx_gettimeofday(&ktv);
                if (put_tv32(tv, &ktv))
                        return -EFAULT;
        }
@@ -710,7 +709,7 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
        return ret;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_SYSCTL_SYSCALL
 struct __sysctl_args32 {
        u32 name;
        int nlen;
@@ -755,7 +754,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
                            put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)))
                                error = -EFAULT;
                }
-               copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
+               if (copy_to_user(args->__unused, tmp.__unused,
+                                sizeof(tmp.__unused)))
+                       error = -EFAULT;
        }
        return error;
 }