projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df8df4f
)
syscall_emul: Return correct writev value
author
Joel Hestness
<jthestness@gmail.com>
Sat, 27 Dec 2014 19:48:40 +0000
(13:48 -0600)
committer
Joel Hestness
<jthestness@gmail.com>
Sat, 27 Dec 2014 19:48:40 +0000
(13:48 -0600)
According to Linux man pages, if writev is successful, it returns the total
number of bytes written. Otherwise, it returns an error code. Instead of
returning 0, return the result from the actual call to writev in the system
call.
src/sim/syscall_emul.hh
patch
|
blob
|
history
diff --git
a/src/sim/syscall_emul.hh
b/src/sim/syscall_emul.hh
index a4f9b238e15b4ef00be3b94a4b1a7d95c616977b..0c06a514712fce3465fcf7e27a4b766fec68640e 100644
(file)
--- a/
src/sim/syscall_emul.hh
+++ b/
src/sim/syscall_emul.hh
@@
-1138,7
+1138,7
@@
writevFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
if (result < 0)
return -errno;
- return
0
;
+ return
result
;
}