Lines Matching refs:len
258 int VirtioGpuStream::writeFully(const void *buf, size_t len) in writeFully() argument
264 if (len > 0) { in writeFully()
268 __func__, len); in writeFully()
279 len, m_cmdPos, m_flushPos); in writeFully()
283 if (m_flushPos + len > cmd->cmdSize) { in writeFully()
286 __func__, len, m_cmdPos, m_flushPos, cmd->cmdSize); in writeFully()
290 if (len > VIRGL_MAX_CMDBUF_SIZE) { in writeFully()
292 __func__, len); in writeFully()
296 memcpy(&m_buf[m_flushPos], buf, len); in writeFully()
297 commitBuffer(len); in writeFully()
298 m_allocSize += len; in writeFully()
302 const unsigned char *VirtioGpuStream::readFully(void *buf, size_t len) in readFully() argument
308 if (len > 0) { in readFully()
312 __func__, len); in readFully()
319 if (len > MAX_CMDRESPBUF_SIZE - sizeof(*m_cmdResp)) { in readFully()
321 __func__, len); in readFully()
331 if (len > 0U && m_cmdRespPos == 0U) { in readFully()
346 if (m_cmdResp->cmdSize - sizeof(*m_cmdResp) < m_cmdRespPos + len) { in readFully()
348 "error, exiting.", __func__, m_cmdResp->op, len, in readFully()
353 memcpy(buf, &m_cmdResp->buf[m_cmdRespPos], len); in readFully()
355 if (m_cmdRespPos + len == m_cmdResp->cmdSize - sizeof(*m_cmdResp)) { in readFully()
358 m_cmdRespPos += len; in readFully()