mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
(s)size_t type cleanup
This commit is contained in:
parent
7e8ad2036a
commit
4cbe86fcb8
@ -1,3 +1,8 @@
|
||||
Thu Feb 19 09:14:56 CET 2009 Guido Günther <agx@sigxcpu.org>
|
||||
|
||||
* src/qemu_driver.c (qemudReadMonitorOutput, qemudReadLogOutput):
|
||||
(s)size_t type cleanup
|
||||
|
||||
Tue Feb 17 20:40:51 EST 2009 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/qemu_driver.c: Remove the _actually_ incorrect
|
||||
|
@ -594,18 +594,18 @@ qemudReadMonitorOutput(virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
int fd,
|
||||
char *buf,
|
||||
int buflen,
|
||||
size_t buflen,
|
||||
qemudHandlerMonitorOutput func,
|
||||
const char *what,
|
||||
int timeout)
|
||||
{
|
||||
int got = 0;
|
||||
size_t got = 0;
|
||||
buf[0] = '\0';
|
||||
timeout *= 1000; /* poll wants milli seconds */
|
||||
|
||||
/* Consume & discard the initial greeting */
|
||||
while (got < (buflen-1)) {
|
||||
int ret;
|
||||
ssize_t ret;
|
||||
|
||||
ret = read(fd, buf+got, buflen-got-1);
|
||||
|
||||
@ -672,17 +672,18 @@ qemudReadLogOutput(virConnectPtr conn,
|
||||
virDomainObjPtr vm,
|
||||
int fd,
|
||||
char *buf,
|
||||
int buflen,
|
||||
size_t buflen,
|
||||
qemudHandlerMonitorOutput func,
|
||||
const char *what,
|
||||
int timeout)
|
||||
{
|
||||
int got = 0;
|
||||
int ret;
|
||||
int retries = timeout*10;
|
||||
buf[0] = '\0';
|
||||
|
||||
while (retries) {
|
||||
ssize_t ret;
|
||||
size_t got = 0;
|
||||
|
||||
while((ret = read(fd, buf+got, buflen-got-1)) > 0) {
|
||||
got += ret;
|
||||
buf[got] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user