def sys_readv(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>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>),<EOL>ptrsize)<EOL>data = self.files[fd].read(size)<EOL>total += len(data)<EOL>cpu.write_bytes(buf, data)<EOL>self.syscall_trace.append(("<STR_LIT>", fd, data))<EOL><DEDENT>return total<EOL>
Works just like C{sys_read} except that data is read into multiple buffers.
:rtype: int

:param fd: the file descriptor of the file to read.
:param iov: the buffer where the the bytes to read are stored.
:param count: amount of C{iov} buffers to read from the file.
:return: the amount of bytes read in total.