# HG changeset patch # Parent c9b7e0c69f88673c79c4a033d4425cc1bba00a6d # User Joel Hestness syscall emulation: 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. diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1138,7 +1138,7 @@ if (result < 0) return -errno; - return 0; + return result; }