提交 4cbe86fc 编写于 作者: G Guido Günther

(s)size_t type cleanup

上级 7e8ad203
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';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册