patch-2.1.115 linux/arch/sparc/kernel/sys_sunos.c
Next file: linux/arch/sparc/kernel/systbls.S
Previous file: linux/arch/sparc/kernel/sys_sparc.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Tue Aug 4 16:03:34 1998
- Orig file:
v2.1.114/linux/arch/sparc/kernel/sys_sunos.c
- Orig date:
Thu Apr 23 20:21:30 1998
diff -u --recursive --new-file v2.1.114/linux/arch/sparc/kernel/sys_sunos.c linux/arch/sparc/kernel/sys_sunos.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sunos.c,v 1.87 1998/03/29 03:48:16 shadow Exp $
+/* $Id: sys_sunos.c,v 1.91 1998/06/16 04:37:04 davem Exp $
* sys_sunos.c: SunOS specific syscall compatibility support.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -60,8 +60,6 @@
/* NR_OPEN is now larger and dynamic in recent kernels. */
#define SUNOS_NR_OPEN 256
-extern unsigned long get_unmapped_area(unsigned long addr, unsigned long len);
-
/* We use the SunOS mmap() semantics. */
asmlinkage unsigned long sunos_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
@@ -569,25 +567,6 @@
return error;
}
-asmlinkage int sunos_getdomainname(char *name, int len)
-{
- int nlen = strlen(system_utsname.domainname);
- int ret = -EFAULT;
-
- lock_kernel();
- if (nlen < len)
- len = nlen;
-
- if(len > __NEW_UTS_LEN)
- goto out;
- if(copy_to_user(name, system_utsname.domainname, len))
- goto out;
- ret = 0;
-out:
- unlock_kernel();
- return ret;
-}
-
struct sunos_utsname {
char sname[9];
char nname[9];
@@ -601,7 +580,7 @@
{
int ret = -EFAULT;
- lock_kernel();
+ down(&uts_sem);
if(!name)
goto out;
if(copy_to_user(&name->sname[0], &system_utsname.sysname[0], sizeof(name->sname) - 1))
@@ -613,7 +592,7 @@
copy_to_user(&name->mach[0], &system_utsname.machine[0], sizeof(name->mach) - 1);
ret = 0;
out:
- unlock_kernel();
+ up(&uts_sem);
return ret;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov