summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/syscall_emul.hh')
-rw-r--r--sim/syscall_emul.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 8eacf9200..60e06b294 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -370,7 +370,7 @@ openFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
if (path == "/dev/sysdev0") {
@@ -417,7 +417,7 @@ chmodFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
uint32_t mode = xc->getSyscallArg(1);
@@ -470,7 +470,7 @@ statFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
struct stat hostBuf;
@@ -522,7 +522,7 @@ lstatFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
struct stat hostBuf;
@@ -544,7 +544,7 @@ lstat64Func(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
#if BSD_HOST
@@ -596,7 +596,7 @@ statfsFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
struct statfs hostBuf;
@@ -770,7 +770,7 @@ utimesFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault)
+ if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
return -EFAULT;
TypedBufferArg<typename OS::timeval [2]> tp(xc->getSyscallArg(1));