| 23 | } |
| 24 | |
| 25 | U32 KObject::writev(KThread* thread, U32 iov, S32 iovcnt) { |
| 26 | U32 len=0; |
| 27 | KMemory* memory = thread->memory; |
| 28 | |
| 29 | for (S32 i=0;i<iovcnt;i++) { |
| 30 | U32 buf = memory->readd(iov + i * 8); |
| 31 | U32 toWrite = memory->readd(iov + i * 8 + 4); |
| 32 | S32 result; |
| 33 | |
| 34 | result = this->write(thread, buf, toWrite); |
| 35 | if (result<0) { |
| 36 | if (i>0) { |
| 37 | kwarn("writev partial fail: TODO file pointer should not change"); |
| 38 | } |
| 39 | return result; |
| 40 | } |
| 41 | len+=result; |
| 42 | } |
| 43 | return len; |
| 44 | } |
| 45 | |
| 46 | U32 KObject::read(KThread* thread, U32 address, U32 len) { |
| 47 | U32 result = 0; |
no test coverage detected