summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTony Gutierrez <anthony.gutierrez@amd.com>2016-08-05 17:15:19 -0400
committerTony Gutierrez <anthony.gutierrez@amd.com>2016-08-05 17:15:19 -0400
commitfa5e64987e185c3cf586e55957ebaa78b8b891fd (patch)
tree1a47d35399b2e98c8b2c754a3d3f3192d64606c0 /src
parent0b68475b102a9ecc769d1a3493a34055e08c2e7e (diff)
downloadgem5-fa5e64987e185c3cf586e55957ebaa78b8b891fd.tar.xz
sim: fix issues with pwrite(); don't enable fstatfs
this patch fixes issues with changeset 11593 use the host's pwrite() syscall for pwrite64Func(), as opposed to pwrite64(), because pwrite64() does not work well on all distros. undo the enabling of fstatfs, as we will add this in a separate pate.
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/linux/process.cc2
-rw-r--r--src/sim/syscall_emul.hh3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 08137b943..f68f1c4c8 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -356,7 +356,7 @@ static SyscallDesc syscallDescs64[] = {
/* 135 */ SyscallDesc("personality", unimplementedFunc),
/* 136 */ SyscallDesc("ustat", unimplementedFunc),
/* 137 */ SyscallDesc("statfs", unimplementedFunc),
- /* 138 */ SyscallDesc("fstatfs", fstatfsFunc<X86Linux64>),
+ /* 138 */ SyscallDesc("fstatfs", unimplementedFunc),
/* 139 */ SyscallDesc("sysfs", unimplementedFunc),
/* 140 */ SyscallDesc("getpriority", unimplementedFunc),
/* 141 */ SyscallDesc("setpriority", unimplementedFunc),
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 906a01edb..7cce9e9c0 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -64,6 +64,7 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/uio.h>
+#include <unistd.h>
#include <cerrno>
#include <string>
@@ -1406,7 +1407,7 @@ pwrite64Func(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc)
BufferArg bufArg(bufPtr, nbytes);
bufArg.copyIn(tc->getMemProxy());
- int bytes_written = pwrite64(sim_fd, bufArg.bufferPtr(), nbytes, offset);
+ int bytes_written = pwrite(sim_fd, bufArg.bufferPtr(), nbytes, offset);
return (bytes_written == -1) ? -errno : bytes_written;
}