diff options
author | Joel Hestness <jthestness@gmail.com> | 2014-12-27 13:48:40 -0600 |
---|---|---|
committer | Joel Hestness <jthestness@gmail.com> | 2014-12-27 13:48:40 -0600 |
commit | 642b9b4fab0fcba77ed4bc596c4adc92ae0f13c3 (patch) | |
tree | 512a314d8416a6b257b58a2e1a84705121814614 /src | |
parent | df8df4fd0a95763cb0658cbe77615e7deac391d3 (diff) | |
download | gem5-642b9b4fab0fcba77ed4bc596c4adc92ae0f13c3.tar.xz |
syscall_emul: Return correct writev value
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/sim/syscall_emul.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index a4f9b238e..0c06a5147 100644 --- 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; } |