def sys_writev(self, fd, iov, count):
cpu = self.current<EOL>ptrsize = cpu.address_bit_size<EOL>sizeof_iovec = <NUM_LIT:2> * (ptrsize // <NUM_LIT:8>)<EOL>total = <NUM_LIT:0><EOL>try:<EOL><INDENT>write_fd = self._get_fd(fd)<EOL><DEDENT>except FdError as e:<EOL><INDENT>logger.error(f"<STR_LIT>")<EOL>return -e.err<EOL><DEDENT>for i in range(<NUM_LIT:0>, count):<EOL><INDENT>buf = cpu.read_int(iov + i * sizeof_iovec, ptrsize)<EOL>size = cpu.read_int(iov + i * sizeof_iovec + (sizeof_iovec // <NUM_LIT:2>), ptrsize)<EOL>data = [Operators.CHR(cpu.read_int(buf + i, <NUM_LIT:8>)) for i in range(size)]<EOL>data = self._transform_write_data(data)<EOL>write_fd.write(data)<EOL>self.syscall_trace.append(("<STR_LIT>", fd, data))<EOL>total += size<EOL><DEDENT>return total<EOL>
Works just like C{sys_write} except that multiple buffers are written out.
:rtype: int

:param fd: the file descriptor of the file to write.
:param iov: the buffer where the the bytes to write are taken.
:param count: amount of C{iov} buffers to write into the file.
:return: the amount of bytes written in total.