fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / sparc64 / kernel / sys_sunos32.c
index ac6079f..2ebc2c0 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/syscalls.h>
-#include <linux/vs_cvirt.h>
 
 #include <asm/uaccess.h>
 #include <asm/page.h>
@@ -44,6 +43,7 @@
 #include <asm/idprom.h> /* for gethostid() */
 #include <asm/unistd.h>
 #include <asm/system.h>
+#include <asm/compat_signal.h>
 
 /* For the nfs mount emulation */
 #include <linux/socket.h>
@@ -83,7 +83,7 @@ asmlinkage u32 sunos_mmap(u32 addr, u32 len, u32 prot, u32 flags, u32 fd, u32 of
                file = fget(fd);
                if (!file)
                        goto out;
-               inode = file->f_dentry->d_inode;
+               inode = file->f_path.dentry->d_inode;
                if (imajor(inode) == MEM_MAJOR && iminor(inode) == 5) {
                        flags |= MAP_ANONYMOUS;
                        fput(file);
@@ -446,20 +446,18 @@ struct sunos_utsname {
 asmlinkage int sunos_uname(struct sunos_utsname __user *name)
 {
        int ret;
-       struct new_utsname *ptr;
 
        down_read(&uts_sem);
-       ptr = vx_new_utsname();
-       ret = copy_to_user(&name->sname[0], ptr->sysname,
+       ret = copy_to_user(&name->sname[0], &utsname()->sysname[0],
                           sizeof(name->sname) - 1);
-       ret |= copy_to_user(&name->nname[0], ptr->nodename,
+       ret |= copy_to_user(&name->nname[0], &utsname()->nodename[0],
                            sizeof(name->nname) - 1);
        ret |= put_user('\0', &name->nname[8]);
-       ret |= copy_to_user(&name->rel[0], ptr->release,
+       ret |= copy_to_user(&name->rel[0], &utsname()->release[0],
                            sizeof(name->rel) - 1);
-       ret |= copy_to_user(&name->ver[0], ptr->version,
+       ret |= copy_to_user(&name->ver[0], &utsname()->version[0],
                            sizeof(name->ver) - 1);
-       ret |= copy_to_user(&name->mach[0], ptr->machine,
+       ret |= copy_to_user(&name->mach[0], &utsname()->machine[0],
                            sizeof(name->mach) - 1);
        up_read(&uts_sem);
        return (ret ? -EFAULT : 0);
@@ -617,7 +615,7 @@ sunos_nfs_get_server_fd (int fd, struct sockaddr_in *addr)
        if (!file)
                return 0;
 
-       inode = file->f_dentry->d_inode;
+       inode = file->f_path.dentry->d_inode;
 
        socket = SOCKET_I(inode);
        local.sin_family = AF_INET;
@@ -1057,7 +1055,7 @@ asmlinkage int sunos_msgsys(int op, u32 arg1, u32 arg2, u32 arg3, u32 arg4)
                break;
        case 2:
                rval = -EFAULT;
-               kmbuf = (struct msgbuf *)kmalloc(sizeof(struct msgbuf) + arg3,
+               kmbuf = kmalloc(sizeof(struct msgbuf) + arg3,
                                                 GFP_KERNEL);
                if (!kmbuf)
                        break;
@@ -1080,7 +1078,7 @@ asmlinkage int sunos_msgsys(int op, u32 arg1, u32 arg2, u32 arg3, u32 arg4)
                break;
        case 3:
                rval = -EFAULT;
-               kmbuf = (struct msgbuf *)kmalloc(sizeof(struct msgbuf) + arg3,
+               kmbuf = kmalloc(sizeof(struct msgbuf) + arg3,
                                                 GFP_KERNEL);
                if (!kmbuf || sunos_msgbuf_get((struct msgbuf32 __user *)(unsigned long)arg2,
                                               kmbuf, arg3))