fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / parisc / kernel / sys_parisc32.c
index bca48bd..1feb553 100644 (file)
@@ -111,13 +111,14 @@ struct __sysctl_args32 {
 
 asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
 {
+#ifndef CONFIG_SYSCTL_SYSCALL
+       return -ENOSYS;
+#else
        struct __sysctl_args32 tmp;
        int error;
        unsigned int oldlen32;
-       size_t oldlen, *oldlenp = NULL;
+       size_t oldlen, __user *oldlenp = NULL;
        unsigned long addr = (((long __force)&args->__unused[0]) + 7) & ~7;
-       extern int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
-              void *newval, size_t newlen);
 
        DBG(("sysctl32(%p)\n", args));
 
@@ -144,8 +145,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
        }
 
        lock_kernel();
-       error = do_sysctl((int *)(u64)tmp.name, tmp.nlen, (void *)(u64)tmp.oldval,
-                         oldlenp, (void *)(u64)tmp.newval, tmp.newlen);
+       error = do_sysctl((int __user *)(u64)tmp.name, tmp.nlen,
+                         (void __user *)(u64)tmp.oldval, oldlenp,
+                         (void __user *)(u64)tmp.newval, tmp.newlen);
        unlock_kernel();
        if (oldlenp) {
                if (!error) {
@@ -157,10 +159,11 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
                                        error = -EFAULT;
                        }
                }
-               if (copy_to_user(&args->__unused[0], tmp.__unused, sizeof(tmp.__unused)))
+               if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
                        error = -EFAULT;
        }
        return error;
+#endif
 }
 
 #endif /* CONFIG_SYSCTL */
@@ -201,11 +204,11 @@ static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i)
 asmlinkage int
 sys32_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
 {
-    extern void do_gettimeofday(struct timeval *tv);
+    extern void vx_gettimeofday(struct timeval *tv);
 
     if (tv) {
            struct timeval ktv;
-           do_gettimeofday(&ktv);
+           vx_gettimeofday(&ktv);
            if (put_compat_timeval(tv, &ktv))
                    return -EFAULT;
     }
@@ -310,9 +313,8 @@ struct readdir32_callback {
 
 #define ROUND_UP(x,a)  ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
 #define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
-static int
-filldir32 (void *__buf, const char *name, int namlen, loff_t offset, ino_t ino,
-          unsigned int d_type)
+static int filldir32 (void *__buf, const char *name, int namlen,
+                       loff_t offset, u64 ino, unsigned int d_type)
 {
        struct linux32_dirent __user * dirent;
        struct getdents32_callback * buf = (struct getdents32_callback *) __buf;
@@ -374,9 +376,8 @@ out:
        return error;
 }
 
-static int
-fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, ino_t ino,
-             unsigned int d_type)
+static int fillonedir32(void * __buf, const char * name, int namlen,
+                       loff_t offset, u64 ino, unsigned int d_type)
 {
        struct readdir32_callback * buf = (struct readdir32_callback *) __buf;
        struct old_linux32_dirent __user * dirent;
@@ -611,7 +612,7 @@ asmlinkage int sys32_sysinfo(struct sysinfo32 __user *info)
 
        do {
                seq = read_seqbegin(&xtime_lock);
-               /* FIXME: requires vx virtualization */
+               /* TODO: requires vx virtualization */
                val.uptime = jiffies / HZ;
 
                val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);