Lines Matching refs:len
54 qemu_fd_write( int fd, const char* cmd, int len ) in qemu_fd_write() argument
58 len2 = write(fd, cmd, len); in qemu_fd_write()
64 qemu_fd_read( int fd, char* buff, int len ) in qemu_fd_read() argument
68 len2 = read(fd, buff, len); in qemu_fd_read()
235 int len; in qemu_command_vformat() local
240 len = vsnprintf(buffer+4, buffer_size-4, format, args); in qemu_command_vformat()
241 if (len >= buffer_size-4) in qemu_command_vformat()
244 snprintf(header, sizeof header, "%04x", len); in qemu_command_vformat()
246 return len + 4; in qemu_command_vformat()
280 qemu_control_send(const char* cmd, int len) in qemu_control_send() argument
284 if (len < 0) { in qemu_control_send()
293 len2 = qemu_fd_write(fd, cmd, len); in qemu_control_send()
295 if (len2 != len) { in qemu_control_send()
297 __FUNCTION__, len2, len); in qemu_control_send()
309 int len, fd; in qemu_control_command() local
312 len = qemu_command_vformat( command, sizeof command, fmt, args ); in qemu_control_command()
315 if (len < 0 || len >= (int)sizeof command) { in qemu_control_command()
316 if (len < 0) { in qemu_control_command()
319 D("%s: too large %d > %d", __FUNCTION__, len, (int)(sizeof command)); in qemu_control_command()
325 return qemu_control_send( command, len ); in qemu_control_command()
331 int ret, fd, len, result = -1; in qemu_control_query() local
359 len = strtol( header, &end, 16 ); in qemu_control_query()
360 if ( len < 0 || end == NULL || end != header+4 || len > answersize ) { in qemu_control_query()
367 ret = qemu_fd_read( fd, answer, len ); in qemu_control_query()
368 if (ret != len) { in qemu_control_query()
370 __FUNCTION__, ret, len); in qemu_control_query()
374 result = len; in qemu_control_query()