From: Tony Gutierrez Date: Fri, 5 Aug 2016 21:15:19 +0000 (-0400) Subject: sim: fix issues with pwrite(); don't enable fstatfs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa5e64987e185c3cf586e55957ebaa78b8b891fd;p=gem5.git 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. --- 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), + /* 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 #include #include +#include #include #include @@ -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; }