summaryrefslogtreecommitdiff
path: root/src/arch/arm/linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/linux')
-rw-r--r--src/arch/arm/linux/linux.cc21
-rw-r--r--src/arch/arm/linux/linux.hh13
-rw-r--r--src/arch/arm/linux/process.cc8
3 files changed, 30 insertions, 12 deletions
diff --git a/src/arch/arm/linux/linux.cc b/src/arch/arm/linux/linux.cc
index a4c782403..c81eee3c8 100644
--- a/src/arch/arm/linux/linux.cc
+++ b/src/arch/arm/linux/linux.cc
@@ -56,15 +56,30 @@ OpenFlagTransTable ArmLinux::openFlagTable[] = {
{ ArmLinux::TGT_O_RDONLY, O_RDONLY },
{ ArmLinux::TGT_O_WRONLY, O_WRONLY },
{ ArmLinux::TGT_O_RDWR, O_RDWR },
- { ArmLinux::TGT_O_APPEND, O_APPEND },
{ ArmLinux::TGT_O_CREAT, O_CREAT },
- { ArmLinux::TGT_O_TRUNC, O_TRUNC },
{ ArmLinux::TGT_O_EXCL, O_EXCL },
- { ArmLinux::TGT_O_NONBLOCK, O_NONBLOCK },
{ ArmLinux::TGT_O_NOCTTY, O_NOCTTY },
+ { ArmLinux::TGT_O_TRUNC, O_TRUNC },
+ { ArmLinux::TGT_O_APPEND, O_APPEND },
+ { ArmLinux::TGT_O_NONBLOCK, O_NONBLOCK },
#ifdef O_SYNC
{ ArmLinux::TGT_O_SYNC, O_SYNC },
#endif
+#ifdef FASYNC
+ { ArmLinux::TGT_FASYNC, FASYNC },
+#endif
+#ifdef O_DIRECT
+ { ArmLinux::TGT_O_DIRECT, O_DIRECT },
+#endif
+#ifdef O_LARGEFILE
+ { ArmLinux::TGT_O_LARGEFILE, O_LARGEFILE },
+#endif
+#ifdef O_DIRECTORY
+ { ArmLinux::TGT_O_DIRECTORY, O_DIRECTORY },
+#endif
+#ifdef O_NOFOLLOW
+ { ArmLinux::TGT_O_NOFOLLOW, O_NOFOLLOW },
+#endif
#endif /* _MSC_VER */
};
diff --git a/src/arch/arm/linux/linux.hh b/src/arch/arm/linux/linux.hh
index 6ad4a862d..33e48fc93 100644
--- a/src/arch/arm/linux/linux.hh
+++ b/src/arch/arm/linux/linux.hh
@@ -79,11 +79,14 @@ class ArmLinux : public Linux
static const int TGT_O_NONBLOCK = 00004000; //!< O_NONBLOCK
static const int TGT_O_SYNC = 00010000; //!< O_SYNC
static const int TGT_FASYNC = 00020000; //!< FASYNC
- static const int TGT_O_DIRECTORY = 00040000; //!< O_DIRECTORY
- static const int TGT_O_NOFOLLOW = 00100000; //!< O_NOFOLLOW
- static const int TGT_O_DIRECT = 00200000; //!< O_DIRECT
- static const int TGT_O_LARGEFILE = 00400000; //!< O_LARGEFILE
+ static const int TGT_O_DIRECT = 00040000; //!< O_DIRECT
+ static const int TGT_O_LARGEFILE = 00100000; //!< O_LARGEFILE
+ static const int TGT_O_DIRECTORY = 00200000; //!< O_DIRECTORY
+ static const int TGT_O_NOFOLLOW = 00400000; //!< O_NOFOLLOW
static const int TGT_O_NOATIME = 01000000; //!< O_NOATIME
+ static const int TGT_O_CLOEXEC = 02000000; //!< O_NOATIME
+
+
//@}
/// For mmap().
@@ -106,7 +109,7 @@ class ArmLinux : public Linux
static const unsigned FIONREAD_ = 0x4004667f;
static const unsigned TIOCISATTY_ = 0x2000745e;
static const unsigned TIOCGETS_ = 0x402c7413;
- static const unsigned TIOCGETA_ = 0x40127417;
+ static const unsigned TIOCGETA_ = 0x5405;
static const unsigned TCSETAW_ = 0x5407; // 2.6.15 kernel
//@}
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 66a19a13f..e3455d211 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -152,7 +152,7 @@ SyscallDesc ArmLinuxProcess::syscallDescs[] = {
/* 72 */ SyscallDesc("sigsuspend", unimplementedFunc),
/* 73 */ SyscallDesc("sigpending", unimplementedFunc),
/* 74 */ SyscallDesc("sethostname", ignoreFunc),
- /* 75 */ SyscallDesc("setrlimit", unimplementedFunc),
+ /* 75 */ SyscallDesc("setrlimit", ignoreFunc),
/* 76 */ SyscallDesc("getrlimit", unimplementedFunc),
/* 77 */ SyscallDesc("getrusage", getrusageFunc<ArmLinux>),
/* 78 */ SyscallDesc("gettimeofday", gettimeofdayFunc<ArmLinux>),
@@ -251,7 +251,7 @@ SyscallDesc ArmLinuxProcess::syscallDescs[] = {
/* 171 */ SyscallDesc("getresgid", unimplementedFunc),
/* 172 */ SyscallDesc("prctl", unimplementedFunc),
/* 173 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
- /* 174 */ SyscallDesc("rt_sigaction", unimplementedFunc),
+ /* 174 */ SyscallDesc("rt_sigaction", ignoreFunc),
/* 175 */ SyscallDesc("rt_sigprocmask", unimplementedFunc),
/* 176 */ SyscallDesc("rt_sigpending", unimplementedFunc),
/* 177 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
@@ -268,10 +268,10 @@ SyscallDesc ArmLinuxProcess::syscallDescs[] = {
/* 188 */ SyscallDesc("unused#188", unimplementedFunc),
/* 189 */ SyscallDesc("unused#189", unimplementedFunc),
/* 190 */ SyscallDesc("vfork", unimplementedFunc),
- /* 191 */ SyscallDesc("getrlimit", unimplementedFunc),
+ /* 191 */ SyscallDesc("getrlimit", getrlimitFunc<ArmLinux>),
/* 192 */ SyscallDesc("mmap2", mmapFunc<ArmLinux>),
/* 193 */ SyscallDesc("truncate64", unimplementedFunc),
- /* 194 */ SyscallDesc("ftruncate64", unimplementedFunc),
+ /* 194 */ SyscallDesc("ftruncate64", ftruncate64Func),
/* 195 */ SyscallDesc("stat64", stat64Func<ArmLinux>),
/* 196 */ SyscallDesc("lstat64", lstat64Func<ArmLinux>),
/* 197 */ SyscallDesc("fstat64", fstat64Func<ArmLinux>),