diff options
Diffstat (limited to 'sim/syscall_emul.cc')
-rw-r--r-- | sim/syscall_emul.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/syscall_emul.cc b/sim/syscall_emul.cc index faad733a8..6c24b6dc5 100644 --- a/sim/syscall_emul.cc +++ b/sim/syscall_emul.cc @@ -82,7 +82,7 @@ SyscallReturn exitFunc(SyscallDesc *desc, int callnum, Process *process, ExecContext *xc) { - new SimExitEvent("syscall caused exit", xc->getSyscallArg(0) & 0xff); + new SimExitEvent("target called exit()", xc->getSyscallArg(0) & 0xff); return 1; } @@ -193,7 +193,7 @@ unlinkFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { string path; - if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault) + if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0))) return (TheISA::IntReg)-EFAULT; int result = unlink(path.c_str()); @@ -205,12 +205,12 @@ renameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { string old_name; - if (xc->getMemPort()->readStringFunctional(old_name, xc->getSyscallArg(0)) != NoFault) + if (!xc->getMemPort()->tryReadStringFunctional(old_name, xc->getSyscallArg(0))) return -EFAULT; string new_name; - if (xc->getMemPort()->readStringFunctional(new_name, xc->getSyscallArg(1)) != NoFault) + if (!xc->getMemPort()->tryReadStringFunctional(new_name, xc->getSyscallArg(1))) return -EFAULT; int64_t result = rename(old_name.c_str(), new_name.c_str()); @@ -222,7 +222,7 @@ truncateFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { string path; - if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault) + if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0))) return -EFAULT; off_t length = xc->getSyscallArg(1); @@ -250,7 +250,7 @@ chownFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { string path; - if (xc->getMemPort()->readStringFunctional(path, xc->getSyscallArg(0)) != NoFault) + if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0))) return -EFAULT; /* XXX endianess */ |