OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [sparc/] [kernel/] [solaris.c] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1624 jcastillo
/* solaris.c: Solaris binary emulation, whee...
2
 *
3
 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
4
 */
5
 
6
#include <linux/kernel.h>
7
#include <linux/types.h>
8
#include <linux/fcntl.h>
9
 
10
#include <asm/errno.h>
11
#include <asm/solerrno.h>
12
 
13
unsigned long solaris_xlatb_rorl[] = {
14
        0, SOL_EPERM, SOL_ENOENT, SOL_ESRCH, SOL_EINTR, SOL_EIO,
15
        SOL_ENXIO, SOL_E2BIG, SOL_ENOEXEC, SOL_EBADF, SOL_ECHILD,
16
        SOL_EAGAIN, SOL_ENOMEM, SOL_EACCES, SOL_EFAULT,
17
        SOL_ENOTBLK, SOL_EBUSY, SOL_EEXIST, SOL_EXDEV, SOL_ENODEV,
18
        SOL_ENOTDIR, SOL_EISDIR, SOL_EINVAL, SOL_ENFILE, SOL_EMFILE,
19
        SOL_ENOTTY, SOL_ETXTBSY, SOL_EFBIG, SOL_ENOSPC, SOL_ESPIPE,
20
        SOL_EROFS, SOL_EMLINK, SOL_EPIPE, SOL_EDOM, SOL_ERANGE,
21
        SOL_EWOULDBLOCK, SOL_EINPROGRESS, SOL_EALREADY, SOL_ENOTSOCK,
22
        SOL_EDESTADDRREQ, SOL_EMSGSIZE, SOL_EPROTOTYPE, SOL_ENOPROTOOPT,
23
        SOL_EPROTONOSUPPORT, SOL_ESOCKTNOSUPPORT, SOL_EOPNOTSUPP,
24
        SOL_EPFNOSUPPORT, SOL_EAFNOSUPPORT, SOL_EADDRINUSE,
25
        SOL_EADDRNOTAVAIL, SOL_ENETDOWN, SOL_ENETUNREACH, SOL_ENETRESET,
26
        SOL_ECONNABORTED, SOL_ECONNRESET, SOL_ENOBUFS, SOL_EISCONN,
27
        SOL_ENOTCONN, SOL_ESHUTDOWN, SOL_ETOOMANYREFS, SOL_ETIMEDOUT,
28
        SOL_ECONNREFUSED, SOL_ELOOP, SOL_ENAMETOOLONG, SOL_EHOSTDOWN,
29
        SOL_EHOSTUNREACH, SOL_ENOTEMPTY, SOL_EUSERS, SOL_EUSERS,
30
        SOL_EDQUOT, SOL_ESTALE, SOL_EREMOTE, SOL_ENOSTR, SOL_ETIME,
31
        SOL_ENOSR, SOL_ENOMSG, SOL_EBADMSG, SOL_EIDRM, SOL_EDEADLK,
32
        SOL_ENOLCK, SOL_ENONET, SOL_EINVAL, SOL_ENOLINK, SOL_EADV,
33
        SOL_ESRMNT, SOL_ECOMM, SOL_EPROTO, SOL_EMULTIHOP, SOL_EINVAL,
34
        SOL_EREMCHG, SOL_ENOSYS
35
};
36
 
37
extern asmlinkage int sys_open(const char *,int,int);
38
 
39
asmlinkage int solaris_open(const char *filename, int flags, int mode)
40
{
41
        int newflags = flags & 0xf;
42
 
43
        flags &= ~0xf;
44
        if(flags & 0x8050)
45
                newflags |= FASYNC;
46
        if(flags & 0x80)
47
                newflags |= O_NONBLOCK;
48
        if(flags & 0x100)
49
                newflags |= O_CREAT;
50
        if(flags & 0x200)
51
                newflags |= O_TRUNC;
52
        if(flags & 0x400)
53
                newflags |= O_EXCL;
54
        if(flags & 0x800)
55
                newflags |= O_NOCTTY;
56
        return sys_open(filename, newflags, mode);
57
}
58
 
59
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.