patch-2.1.23 linux/arch/sparc/kernel/solaris.c
Next file: linux/arch/sparc/kernel/sparc-stub.c
Previous file: linux/arch/sparc/kernel/smp.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Sun Jan 26 12:07:07 1997
- Orig file:
v2.1.22/linux/arch/sparc/kernel/solaris.c
- Orig date:
Wed Dec 18 15:58:45 1996
diff -u --recursive --new-file v2.1.22/linux/arch/sparc/kernel/solaris.c linux/arch/sparc/kernel/solaris.c
@@ -6,43 +6,22 @@
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fcntl.h>
+#include <linux/sched.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
#include <asm/errno.h>
#include <asm/solerrno.h>
-#if 0
-/* Not used - actually translated in iBCS */
-unsigned long solaris_xlatb_rorl[] = {
- 0, SOL_EPERM, SOL_ENOENT, SOL_ESRCH, SOL_EINTR, SOL_EIO,
- SOL_ENXIO, SOL_E2BIG, SOL_ENOEXEC, SOL_EBADF, SOL_ECHILD,
- SOL_EAGAIN, SOL_ENOMEM, SOL_EACCES, SOL_EFAULT,
- SOL_ENOTBLK, SOL_EBUSY, SOL_EEXIST, SOL_EXDEV, SOL_ENODEV,
- SOL_ENOTDIR, SOL_EISDIR, SOL_EINVAL, SOL_ENFILE, SOL_EMFILE,
- SOL_ENOTTY, SOL_ETXTBSY, SOL_EFBIG, SOL_ENOSPC, SOL_ESPIPE,
- SOL_EROFS, SOL_EMLINK, SOL_EPIPE, SOL_EDOM, SOL_ERANGE,
- SOL_EWOULDBLOCK, SOL_EINPROGRESS, SOL_EALREADY, SOL_ENOTSOCK,
- SOL_EDESTADDRREQ, SOL_EMSGSIZE, SOL_EPROTOTYPE, SOL_ENOPROTOOPT,
- SOL_EPROTONOSUPPORT, SOL_ESOCKTNOSUPPORT, SOL_EOPNOTSUPP,
- SOL_EPFNOSUPPORT, SOL_EAFNOSUPPORT, SOL_EADDRINUSE,
- SOL_EADDRNOTAVAIL, SOL_ENETDOWN, SOL_ENETUNREACH, SOL_ENETRESET,
- SOL_ECONNABORTED, SOL_ECONNRESET, SOL_ENOBUFS, SOL_EISCONN,
- SOL_ENOTCONN, SOL_ESHUTDOWN, SOL_ETOOMANYREFS, SOL_ETIMEDOUT,
- SOL_ECONNREFUSED, SOL_ELOOP, SOL_ENAMETOOLONG, SOL_EHOSTDOWN,
- SOL_EHOSTUNREACH, SOL_ENOTEMPTY, SOL_EUSERS, SOL_EUSERS,
- SOL_EDQUOT, SOL_ESTALE, SOL_EREMOTE, SOL_ENOSTR, SOL_ETIME,
- SOL_ENOSR, SOL_ENOMSG, SOL_EBADMSG, SOL_EIDRM, SOL_EDEADLK,
- SOL_ENOLCK, SOL_ENONET, SOL_EINVAL, SOL_ENOLINK, SOL_EADV,
- SOL_ESRMNT, SOL_ECOMM, SOL_EPROTO, SOL_EMULTIHOP, SOL_EINVAL,
- SOL_EREMCHG, SOL_ENOSYS
-};
-#endif
-
extern asmlinkage int sys_open(const char *,int,int);
asmlinkage int solaris_open(const char *filename, int flags, int mode)
{
- int newflags = flags & 0xf;
+ int newflags;
+ int ret;
+ lock_kernel();
+ newflags = flags & 0xf;
flags &= ~0xf;
if(flags & 0x8050)
newflags |= FASYNC;
@@ -56,7 +35,9 @@
newflags |= O_EXCL;
if(flags & 0x800)
newflags |= O_NOCTTY;
- return sys_open(filename, newflags, mode);
+ ret = sys_open(filename, newflags, mode);
+ unlock_kernel();
+ return ret;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov